Skip site navigation (1) Skip section navigation (2)

Re: Immediate shutdown and system(3)

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Greg Stark <stark(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Immediate shutdown and system(3)
Date: 2009-02-27 12:19:26
Message-ID: 49A7DA4E.7090004@enterprisedb.com (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2009-02-27 12:50:49
Subject: Patch for not going beyond NOFILE system limit (updated)
Previous:From: Heikki LinnakangasDate: 2009-02-27 12:14:34
Subject: Re: BUG #4680: Server crashed if using wrong (mismatch) conversion functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group