bug in SignalSomeChildren

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: bug in SignalSomeChildren
Date: 2010-12-15 03:54:39
Message-ID: AANLkTikhV9vJMsokP8A1Zt2k1Zi+GvBhR+iHs8O7gUau@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-12-15 03:55:46 Re: pg_execute_from_file, patch v10
Previous Message Alvaro Herrera 2010-12-15 03:51:13 Re: Getting "ERROR: no unpinned buffers available" on HEAD, should I investigate?