Postgres and Upstart - Mailing list pgsql-general

From Chris Angelico
Subject Postgres and Upstart
Date
Msg-id CAPTjJmqD6oRXFYdfi-Da13a6sLpy=v84Tc8Bq2-m+rQArqbvMA@mail.gmail.com
Whole thread Raw
Responses Re: Postgres and Upstart
List pgsql-general
We run a multi-node replication setup with an in-house monitoring
program that decides when to promote a slave, etc, etc. Everything is
managed through Upstart.

I'm looking for a reliable way to be sure that Postgres has finished
its initialization and is ready to rumble. Especially, I don't want to
SIGHUP the server before it's hooked the signal! (My logs show
repeated "server killed by HUP" messages. Amusing perhaps, but not
very helpful.)

Would it be possible to have a configuration entry to have postmaster
SIGSTOP itself as soon as, but no sooner than, it's fully ready?
Upstart can recognize this signal (and will promptly SIGCONT it), and
use it as an indication of readiness (the "expect stop" stanza).

Or maybe it already exists in some other form and I haven't seen it,
in which case all I'm asking is: How best can this be done?

Chris Angelico

pgsql-general by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: Function to dump function ddl
Next
From: Laszlo Fogas
Date:
Subject: slowness what only full vacuum can solve