Re: Proposal for Signal Detection Refactoring

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Proposal for Signal Detection Refactoring
Дата
Msg-id
5951.1537837429@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Michael Paquier <michael@paquier.xyz>
Re: Proposal for Signal Detection Refactoring Andres Freund <andres@anarazel.de>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Michael Paquier <michael@paquier.xyz>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Andres Freund <andres@anarazel.de>
Re: Proposal for Signal Detection Refactoring Michael Paquier <michael@paquier.xyz>
Re: Proposal for Signal Detection Refactoring Andres Freund <andres@anarazel.de>
Re: Proposal for Signal Detection Refactoring Michael Paquier <michael@paquier.xyz>
Re: Proposal for Signal Detection Refactoring Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Proposal for Signal Detection Refactoring Andres Freund <andres@anarazel.de>
Re: Proposal for Signal Detection Refactoring Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal for Signal Detection Refactoring Michael Paquier <michael@paquier.xyz>
Re: Proposal for Signal Detection Refactoring Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal for Signal Detection Refactoring Michael Paquier <michael@paquier.xyz>
Re: Proposal for Signal Detection Refactoring Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal for Signal Detection Refactoring Michael Paquier <michael@paquier.xyz>
Re: Proposal for Signal Detection Refactoring Andres Freund <andres@anarazel.de>
Re: Proposal for Signal Detection Refactoring Michael Paquier <michael@paquier.xyz>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Michael Paquier <michael@paquier.xyz>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@gmail.com>
Re: Proposal for Signal Detection Refactoring Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Proposal for Signal Detection Refactoring Andres Freund <andres@anarazel.de>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Michael Paquier <michael@paquier.xyz>
Re: Proposal for Signal Detection Refactoring Andres Freund <andres@anarazel.de>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal for Signal Detection Refactoring Thomas Munro <thomas.munro@gmail.com>
Re: Proposal for Signal Detection Refactoring Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Proposal for Signal Detection Refactoring Craig Ringer <craig@2ndquadrant.com>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Dmitry Dolgov <9erthalion6@gmail.com>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Andres Freund <andres@anarazel.de>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Re: Proposal for Signal Detection Refactoring Chris Travers <chris.travers@adjust.com>
Michael Paquier  writes:
> And then within separate signal handlers things like:
> void
> StatementCancelHandler(SIGNAL_ARGS)
> {
>     [...]
>     signalPendingFlags |= PENDING_INTERRUPT | PENDING_CANCEL_QUERY;
>     [...]
> }

AFAICS this still wouldn't work.  The machine code is still going to
look (on many machines) like "load from signalPendingFlags,
OR in some bits, store to signalPendingFlags".  So there's still a
window for another signal handler to interrupt that and store some
bits that will get lost.

You could only fix that by blocking all signal handling during the
handler, which would be expensive and rather pointless.

I do not think that it's readily possible to improve on the current
situation with one sig_atomic_t per flag.

			regards, tom lane

В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата:
От: Michael Paquier
Дата:
FAQ