Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket

Поиск
Список
Период
Сортировка
Искать
От
Nico Williams
Тема
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket
Дата
Msg-id
20180719200414.GK9712@localhost
Ответ на
Список
Дерево обсуждения
[HACKERS] possible self-deadlock window after bad ProcessStartupPacket Jimmy Yih <jyih@pivotal.io>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after bad ProcessStartupPacket Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after bad ProcessStartupPacket Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Heikki Linnakangas <hlinnaka@iki.fi>
Re: [HACKERS] possible self-deadlock window after bad ProcessStartupPacket Asim R P <apraveen@pivotal.io>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Heikki Linnakangas <hlinnaka@iki.fi>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Heikki Linnakangas <hlinnaka@iki.fi>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Heikki Linnakangas <hlinnaka@iki.fi>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Heikki Linnakangas <hlinnaka@iki.fi>
Re: [HACKERS] possible self-deadlock window after bad ProcessStartupPacket Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] possible self-deadlock window after bad ProcessStartupPacket Ashwin Agrawal <aagrawal@pivotal.io>
Re: [HACKERS] possible self-deadlock window after bad ProcessStartupPacket Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after bad ProcessStartupPacket Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Nico Williams <nico@cryptonector.com>
Re: [HACKERS] possible self-deadlock window after badProcessStartupPacket Andres Freund <andres@anarazel.de>
Re: [HACKERS] possible self-deadlock window after bad ProcessStartupPacket Robert Haas <robertmhaas@gmail.com>
On Thu, Jun 22, 2017 at 03:10:31PM -0400, Tom Lane wrote:
> Andres Freund  writes:
> > Or, probably more robust: Simply _exit(2) without further ado, and rely
> > on postmaster to output an appropriate error message. Arguably it's not
> > actually useful to see hundreds of "WARNING: terminating connection because of
> > crash of another server process" messages in the log anyway.
> 
> At that point you might as well skip the entire mechanism and go straight
> to SIGKILL.  IMO the only reason quickdie() exists at all is to try to
> send a helpful message to the client.  And it is helpful --- your attempt
> to claim that it isn't sounds very much like wishful thinking.

I dunno if it is or isn't helpful.  But I do know that this must be done
in an async-signal-safe way.

Besides making ereport() async-signal-safe, which is tricky, you could
write(2) the arguments to a pipe that another thread in the same process
is reading from and which will then call ereport() and exit(3).  This
would be less work if you're willing to use a thread for that (the
thread would only block in read(2) on that pipe, and would only provide
this one service).

Nico
-- 

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Nico Williams
Дата:
FAQ