Postgres and Upstart

From: Chris Angelico <rosuav(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Postgres and Upstart
Date: 2012-08-10 10:32:13
Message-ID: CAPTjJmqD6oRXFYdfi-Da13a6sLpy=v84Tc8Bq2-m+rQArqbvMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laszlo Fogas 2012-08-10 11:53:36 slowness what only full vacuum can solve
Previous Message Albe Laurenz 2012-08-10 08:51:21 Re: Function to dump function ddl