summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-09-23 17:17:02 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2010-09-23 17:17:02 -0400
commitc825a15700907d6a155511d82bcf8fe0f2f7dc0b (patch)
tree1408f9471862cb748becfe0cc0bd2d455080373b /src
parentf73ccedcf857e1855b44a9b2545ff7b8ee498ee5 (diff)
ProcessIncomingNotify *must* reset notifyInterruptOccurred when called.
This was broken in 9.0 by careless addition of an early-exit path. Bug report and diagnosis by Jeff Davis.
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/async.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c
index c3e783a8cae..ea51f6d0cc8 100644
--- a/src/backend/commands/async.c
+++ b/src/backend/commands/async.c
@@ -2090,7 +2090,10 @@ ProcessIncomingNotify(void)
{
bool catchup_enabled;
- /* Do nothing if we aren't actively listening */
+ /* We *must* reset the flag */
+ notifyInterruptOccurred = 0;
+
+ /* Do nothing else if we aren't actively listening */
if (listenChannels == NIL)
return;
@@ -2102,8 +2105,6 @@ ProcessIncomingNotify(void)
set_ps_display("notify interrupt", false);
- notifyInterruptOccurred = 0;
-
/*
* We must run asyncQueueReadAllNotifications inside a transaction, else
* bad things happen if it gets an error.