Re: Re: [SQL] PostgreSQL crashes on me :(

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [SQL] PostgreSQL crashes on me :(
Date: 2000-12-18 15:41:47
Message-ID: 19085.977154107@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

ncm(at)zembu(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2000-12-18 17:19:45 Re: Ocasional problems !!!!
Previous Message Tom Lane 2000-12-18 15:30:12 Re: Tuple data

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2000-12-18 16:22:20 Re: Best database structure for timely ordered values
Previous Message Alessio Bragadini 2000-12-18 15:16:52 Re: Confused by timezones