We manage all of our postgres installations with Chef. Even if you're using
different management software, maybe ours will be helpful to you:

https://github.com/wanelo-chef/postgres/blob/master/recipes/server.rb

There are a few things hard-coded into these recipes that may or may not
appeal to you:
* postgres is installed in /opt/local/postgres-version
* a version-specific method script is created to start/stop/restart postgres
* data is assumed to be in a version-specific data directory, ie
/var/pgsql/data93
* a version-specific service is registered. So upgraded a minor release is
disabling the old one, enabling the new one. This of course does not work
with major version upgrades, which do not have binary compatibility with
the data directory.

SMF handles the autostart. If you disable it temporarily (svcadm disable -s
postgres), then it will reenable itself on reboot.



On Sun, Jun 1, 2014 at 9:49 AM, Ganapathy S A via smartos-discuss <
[email protected]> wrote:

> I'm using SmartOS base64 14.1.0 instance and using postgres-9.3.4 inside a
> zone. Everytime I had to manually start postgres! How to set it up as a
> service & control via SMF and more importantly autostart it inside the zone?
>
> Regards,
> Ganapathy
> *smartos-discuss* | Archives
> <https://www.listbox.com/member/archive/184463/=now>
> <https://www.listbox.com/member/archive/rss/184463/24423351-9edae294> |
> Modify
> <https://www.listbox.com/member/?&;>
> Your Subscription <http://www.listbox.com>
>



-- 
----
e s



-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to