Re: [RFC] Should we fix postmaster to avoid slow shutdown?
От | Tsunakawa, Takayuki |
---|---|
Тема | Re: [RFC] Should we fix postmaster to avoid slow shutdown? |
Дата | |
Msg-id | 0A3221C70F24FB45833433255569204D1F638210@G01JPEXMBYT05 обсуждение исходный текст |
Ответ на | Re: [RFC] Should we fix postmaster to avoid slow shutdown? (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>) |
Ответы |
Re: [RFC] Should we fix postmaster to avoid slow shutdown?
|
Список | pgsql-hackers |
From: pgsql-hackers-owner@postgresql.org > [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Ashutosh Bapat > In pgstat_quickdie(), I think a call to sigaddset(&BlockSig, SIGQUIT) is > missing before PG_SETMASK(). Although there are some SIGQUIT handlers which > do not have that call. But I guess, it will be safer to have it. I didn't add it because pgstat_quickdie() just exits, like some other postmaster children. I thought those processes whichare concerned about their termination processing call sigaddset(SIGQUIT), so I went after the processes who aren't. Is this really necessary? > Also, many other SIGQUIT handlers like bgworker_quickdie() call > on_exit_reset() followed by exit(2) instead of just exit(1) in > pgstat_quickdie(). Why is this difference? As Robert and Tom said, either exit(1) or exit(2) is OK because reaper() handles non-zero exit code the same. Regardingon_proc_reset(), stats collector is not attached to the shared memory and does not register on_proc_exit() callbacks. These situations are the same as the archiver process, so I followed it. Regards Takayuki Tsunakawa
В списке pgsql-hackers по дате отправления: