pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgresql.org
Subject: Re: Re: [SQL] PostgreSQL crashes on me :(
Date: Mon, 18 Dec 2000 10:41:47 -0500
Message-ID: <19085.977154107@sss.pgh.pa.us> (raw)
In-Reply-To: <20001217230141.A28714@store.zembu.com>
References: <20001217215118.D64770@ilse.nl>
	<21339.977111275@sss.pgh.pa.us>
	<20001217230141.A28714@store.zembu.com>

ncm@zembu.com (Nathan Myers) writes:
> Sounds like a TODO list item: eliminate syscalls from signal handlers.

After looking at it some more, I think that's a lot easier said than
done.  We could try writing the postmaster's SIGCHLD routine in the 
same style currently used for SIGHUP --- ie, signal handler just sets
a flag that's examined by the main loop in ServerLoop --- but I don't
see any way to guarantee timely response if we do that.  If the SIGCHLD
happens just before we reach the select() then the select() will block,
and we won't respond to the dying child until the next connection
request arrives or some other signal happens.  That's OK under normal
scenarios, but highly not OK when a backend has crashed.

Any thoughts on a cleaner solution?

BTW, we do block signals except at the select(), so the fear of random
syscalls being interrupted by random other syscalls is overstated.

			regards, tom lane



view thread (12+ messages)  latest in thread

Message-ID: <19085.977154107@sss.pgh.pa.us>
Permalink:  ../19085.977154107@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19085.977154107@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [SQL] PostgreSQL crashes on me :(
  In-Reply-To: <19085.977154107@sss.pgh.pa.us>
  References: <20001217215118.D64770@ilse.nl> <21339.977111275@sss.pgh.pa.us> <20001217230141.A28714@store.zembu.com> <19085.977154107@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox