pgsql: Block interrupts during HandleParallelMessages().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Block interrupts during HandleParallelMessages().
Дата
Msg-id E1bUgTN-0008Cg-QN@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Block interrupts during HandleParallelMessages().

As noted by Alvaro, there are CHECK_FOR_INTERRUPTS() calls in the shm_mq.c
functions called by HandleParallelMessages().  I believe they're all
unreachable since we always pass nowait = true, but it doesn't seem like
a great idea to assume that no such call will ever be reachable from
HandleParallelMessages().  If that did happen, there would be a risk of a
recursive call to HandleParallelMessages(), which it does not appear to be
designed for --- for example, there's nothing that would prevent
out-of-order processing of received messages.  And certainly such cases
cannot easily be tested.  So let's prevent it by holding off interrupts for
the duration of the function.  Back-patch to 9.5 which contains identical
code.

Discussion: <14869.1470083848@sss.pgh.pa.us>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b6a97b91ffe8e0c6b6557eb4aef85bcbd423ad5f

Modified Files
--------------
src/backend/access/transam/parallel.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Block interrupts during HandleParallelMessages().
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: doc: OS collation changes can break indexes