Review: support for multiplexing SIGUSR1

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Review: support for multiplexing SIGUSR1
Дата
Msg-id 3073cc9b0907160057s2541457aj65cba2593ca11867@mail.gmail.com
обсуждение исходный текст
Ответы Re: Review: support for multiplexing SIGUSR1  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Список pgsql-hackers
Hi,

I'm reviewing this patch:
http://archives.postgresql.org/message-id/3f0b79eb0907022341m1d36a841x19c3e2a5a6906b5b@mail.gmail.com

This one applies almost cleanly, except for a minor hunk in elog.c and
postinit.c
Compiles and pass regression tests (i tried both steps in a debian
lenny amd turion x2 64bits and in a windows xp sp2)

about the patch itself:
Tom objects to a previous patch for this here:
http://archives.postgresql.org/message-id/14969.1228835521@sss.pgh.pa.us
This new patch doesn't use PGPROC struct anymore, instead it uses a
ProcSignalSlot struct defined as:

typedef struct {   pid_t       pss_pid;   sig_atomic_t pss_signalFlags[NUM_PROCSIGNALS];
} ProcSignalSlot;

which, AFAIU, seems to be in sync with Tom's advice here:
http://archives.postgresql.org/pgsql-hackers/2008-12/msg00556.php

something that make me nervous is this:       /*        * Note: Since there's no locking, it's possible that the target
      * process detaches from shared memory and exits right after this        * test, before we set the flag and send
signal.And the signal slot        * might even be recycled by a new process, so it's remotely possible        * that we
seta flag for a wrong process. That's OK, all the signals        * are such that no harm is done if they're mistakenly
fired.       */ 

can we signal a wrong process and still "be fine"?

besides, seems like SendProcSignal is still attached to SIGUSR1 only,
is this fine?

the rest of the patch (or better ways of testing it) is beyond my knowledge...
i think a reviewer should take a look on it, specially Tom because he
rejected the other one...

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Synch Rep for CommitFest 2009-07
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Synch Rep for CommitFest 2009-07