opscode-cookbooks/postgresql — pull request #69 by knuckolls (2013-08-07 20:35:54+00:00)
Title: Immediate restarts on config files break the ability to provide ssl certs in a wrapper cookbook

There is more detail in the JIRA ticket here [1] but the TLDR is that if you create the data_directory and the ssl certs in a wrapper cookbook before running "include_recipe 'postgresql::server'" on ubuntu-12.04 the postinst on the debian package won't set everything up that the cookbook assumes it's setting up. If you try to do it after the include_recipe then the :immediate restarts inside the postgresql::server cookbook kill the chef run with an exception because ssl is on but the certs haven't been provided yet.

Delayed lets you provide additional configuration before postgresql is started up.

[1] http://tickets.opscode.com/browse/COOK-3427