Re: Immediate shutdown and system(3) - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Immediate shutdown and system(3)
Date
Msg-id 49A7DA4E.7090004@enterprisedb.com
Whole thread Raw
In response to Re: Immediate shutdown and system(3)  (Greg Stark <stark@enterprisedb.com>)
Responses Re: Immediate shutdown and system(3)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Greg Stark wrote:
> This isn't the first time we've run into the problem that we've run
> out of signals. I think we need to multiplex all our event signals
> onto a single signal and use some other mechanism to indicate the type
> of message.

Yeah. A patch to do that was discussed a while ago, as Fujii's 
synchronous replication patch bumped into that as well. I don't feel 
like changing the signaling so dramatically right now, however.

> Do we really need a "promote to master" message at all? Is pg_standby
> responsible for this or could the master write out the configuration
> changes necessary itself?

The way pg_standby works is that it keeps waiting for new WAL files to 
arrive, until it's told to stop and return a non-zero exit code. 
Non-zero exit code from restore_command basically means "file not 
found", making the startup process to end recovery and start up the 
database. There's two ways to tell pg_standby to stop: create a trigger 
file with a particular name, or signal it with SIGINT or SIGQUIT.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Error codes for LIMIT and OFFSET
Next
From: Peter Eisentraut
Date:
Subject: Patch for not going beyond NOFILE system limit (updated)