Re: Multiplexing SUGUSR1
От | Fujii Masao |
---|---|
Тема | Re: Multiplexing SUGUSR1 |
Дата | |
Msg-id | 3f0b79eb0812082033o4dbbfd5dy1c0a605b3dd05e80@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Multiplexing SUGUSR1 (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>) |
Ответы |
Re: Multiplexing SUGUSR1
|
Список | pgsql-hackers |
Hi, On Mon, Dec 8, 2008 at 11:39 PM, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote: > Tom Lane wrote: >> >> Heikki Linnakangas <heikki.linnakangas@enterprisedb.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). Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
Вложения
В списке pgsql-hackers по дате отправления: