Hi,

I found a bug which always prevents SignalSomeChildren with
BACKEND_TYPE_WALSND from sending a signal to walsender.

Though currently SignalSomeChildren with BACKEND_TYPE_WALSND
has not been called anywhere, it's not hard to believe that will
be called in the future. So we should apply the following change.

----------------------
diff --git a/src/backend/postmaster/postmaster.c
b/src/backend/postmaster/postmaster.c
index 6f934ee..2d86fb6 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -3162,7 +3162,8 @@ SignalSomeChildren(int signal, int target)

                if (bp->dead_end)
                        continue;
-               if (!(target & BACKEND_TYPE_NORMAL) && !bp->is_autovacuum)
+               if (!(target & BACKEND_TYPE_NORMAL) && !bp->is_autovacuum &&
+                       !IsPostmasterChildWalSender(bp->child_slot))
                        continue;
                if (!(target & BACKEND_TYPE_AUTOVAC) && bp->is_autovacuum)
                        continue;
----------------------

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to