How to implement autostart of postgres?

From: "Gavrina, Irina" <igavrina(at)mera(dot)ru>
To: <pgsql-general(at)postgresql(dot)org>
Subject: How to implement autostart of postgres?
Date: 2011-07-20 11:02:29
Message-ID: 1958F96A86875D4F8B605C0E8054A8F10188DE5D@gmail.merann.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello All,

I've faced with the following problem: I'm trying to implement the auto
start of postgres. My way is to use inittab:
pg:2345:respawn:/bin/su - postgres -c "/usr/local/pgsql/bin/postmaster
-D/usr/local/pgsql/data >> /usr/local/pgsql/server.log 2>&1" /dev/null
But this approach does not work as I wished in case of the postmaster
process dies - it can not be restarted until all child processes are
stopped. And I have to do it manually.
Is there any way to implement autostart of postgres after the postmaster
process dies?
Probably there is a configuration if the postmaster process dies all
child processes are killed? But I can find nothing like this in
documentation.

Or maybe there is another solution to implement auto start of postgres?
Any help are very appreciated.

Also I've read about a patch of Peter Geoghegan regarding the waking on
postmaster death functionality:
http://archives.postgresql.org/pgsql-hackers/2011-05/msg01196.php
http://archives.postgresql.org/pgsql-announce/2011-06/msg00016.php
<http://archives.postgresql.org/pgsql-announce/2011-06/msg00016.php>
Will this patch be included in any release? If yes then when it is
planned?

I'm using the PostgreSQL 9.0.4 version.

Thanks in advance,

Irina

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ruben Blanco 2011-07-20 11:09:08 Worse performance on partitioned table than in non partitioned table
Previous Message Sofer, Yuval 2011-07-20 10:56:34 compile postgres with visual studio 2010