[HACKERS] Regression stoping PostgreSQL 9.4.13 if a walsender is running

Поиск
Список
Период
Сортировка
От Marco Nenciarini
Тема [HACKERS] Regression stoping PostgreSQL 9.4.13 if a walsender is running
Дата
Msg-id 1434ad79-ab0d-d6a9-4ea2-1afb1c06adaf@2ndquadrant.it
обсуждение исходный текст
Ответы Re: [HACKERS] Regression stoping PostgreSQL 9.4.13 if a walsender is running  (Michael Paquier <michael.paquier@gmail.com>)
Re: [HACKERS] Regression stoping PostgreSQL 9.4.13 if a walsender is running  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
I have noticed that after the 9.4.13 release PostgreSQL reliably fails
to shutdown with smart and fast method if there is a running walsender.

The postmaster continues waiting forever for the walsender termination.

It works perfectly with all the other major releases.

I bisected the issue to commit 1cdc0ab9c180222a94e1ea11402e728688ddc37d

After some investigation I discovered that the instruction that sets
got_SIGUSR2 was lost during the backpatch in the WalSndLastCycleHandler
function.

The trivial patch is the following:

~~~
diff --git a/src/backend/replication/walsender.c
b/src/backend/replication/walsender.c
index a0601b3..b24f9a1 100644
*** a/src/backend/replication/walsender.c
--- b/src/backend/replication/walsender.c
*************** WalSndLastCycleHandler(SIGNAL_ARGS)
*** 2658,2663 ****
--- 2658,2664 ---- {   int         save_errno = errno;

+   got_SIGUSR2 = true;   if (MyWalSnd)       SetLatch(&MyWalSnd->latch);

~~~

Regards,
Marco

--
Marco Nenciarini - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it


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

Предыдущее
От: Alexander Kumenkov
Дата:
Сообщение: Re: [HACKERS] Proposal: Improve bitmap costing for lossy pages
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] coverage analysis improvements