Re: [v9.3] Extra Daemons (Re: elegant and effective way for running jobs inside a database)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, "David E(dot) Wheeler" <david(at)justatheory(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [v9.3] Extra Daemons (Re: elegant and effective way for running jobs inside a database)
Date: 2012-11-23 16:18:29
Message-ID: 20224.1353687509@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> If the bgworker developer gets really tense about this stuff (or
> anything at all, really), they can create a completely new sigmask and
> do sigaddset() etc. Since this is all C code, we cannot keep them from
> doing anything, really; I think what we need to provide here is just a
> framework to ease development of simple cases.

An important point here is that if a bgworker does need to do its own
signal manipulation --- for example, installing custom signal handlers
--- it would be absolutely catastrophic for us to unblock signals before
reaching worker-specific code; signals might arrive before the process
had a chance to fix their handling. So I'm against Heikki's auto-unblock
proposal.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-11-23 16:24:48 Re: [Re] [Re] Re: PANIC: could not write to log file
Previous Message Alvaro Herrera 2012-11-23 15:44:14 Re: autovacuum truncate exclusive lock round two