From: | Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Regression stoping PostgreSQL 9.4.13 if a walsender is running |
Date: | 2017-08-22 17:28:22 |
Message-ID: | 1434ad79-ab0d-d6a9-4ea2-1afb1c06adaf@2ndquadrant.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)nenciarini(at)2ndQuadrant(dot)it | www.2ndQuadrant.it
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-08-22 18:47:18 | Re: coverage analysis improvements |
Previous Message | Alexander Kumenkov | 2017-08-22 15:10:23 | Re: Proposal: Improve bitmap costing for lossy pages |