Re: Re: [SQL] PostgreSQL crashes on me :(

Поиск
Список
Период
Сортировка
От ncm@zembu.com (Nathan Myers)
Тема Re: Re: [SQL] PostgreSQL crashes on me :(
Дата
Msg-id 20001217230141.A28714@store.zembu.com
обсуждение исходный текст
Ответ на Re: [SQL] PostgreSQL crashes on me :(  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Re: [SQL] PostgreSQL crashes on me :(  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Dec 17, 2000 at 10:47:55PM -0500, Tom Lane wrote:
> 
> A quick-and-dirty workaround would be to save and restore errno in
> reaper() and the other postmaster signal handlers.  It might be
> a better idea in the long run to avoid doing system calls in the
> signal handlers --- but that would take a more substantial rewrite.
> 
> I seem to recall previous pghackers discussions in which
> saving/restoring errno looked like a good idea.  Not sure why
> it hasn't been done already.

Syscalls in signal handlers open doors for lots of mischief, not least 
because it's impractical to test all the combinations of half-run mainline
syscalls with all the other syscalls that may occur in signal handlers.  
(select() and wait(), by themselves, get exercised enough, but bugs in
other pairs may be too hard to reproduce ever to be identified.)  Maybe 
somebody noted that patching errno handling would only close one hole, 
and make it less likely the real fix would be done.

That the signal handler got an error on its syscall might be cause for 
concern as well.  

Sounds like a TODO list item: eliminate syscalls from signal handlers.

Nathan Myers
ncm@zembu.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Who is a maintainer of GiST code ?
Следующее
От: Karel Zak
Дата:
Сообщение: Re: Trigger