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

Re: Multiplexing SUGUSR1

From: "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Multiplexing SUGUSR1
Date: 2008-12-09 04:33:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

On Mon, Dec 8, 2008 at 11:39 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Tom Lane wrote:
>> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>>> To set or clear the flag from PGPROC, to send or handle a signal, we have
>>> to acquire ProcArrayLock. Is that safe to do in a signal handler?
>> No.  If it's trying to do that then it's broken.  In fact, if it's
>> trying to do much of anything beyond setting a "volatile" flag variable
>> in a signal handler, it's broken --- unless there are special provisions
>> to limit where the signal trap can occur, which would be pretty much
>> unacceptable for a multiplexed-signal implementation.
> Ok, I was afraid so.
> I think we'll need to replace the proposed bitmask with an array of
> sig_atomic_t flags then, and do without locking.

Thanks! I updated the patch so (based on signal_handling_v2-heikki-1.patch).


Fujii Masao
NTT Open Source Software Center

Attachment: signal_handling_v3-fujii-1.patch
Description: text/x-patch (19.2 KB)

In response to


pgsql-hackers by date

Next:From: ITAGAKI TakahiroDate: 2008-12-09 06:28:46
Subject: Re: contrib/pg_stat_statements 1202
Previous:From: Euler Taveira de OliveiraDate: 2008-12-09 04:31:05
Subject: operator does not exist: smallint <> smallint[]

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