From: Marko Tiikkaja <marko@joh.to>
To: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #9557: Row not visible after receiving notification
Date: Thu, 13 Mar 2014 15:47:36 +0100
Message-ID: <5321C508.8090703@joh.to> (raw)
In-Reply-To: <5321B8E0.9040601@joh.to>
References: <20140313093922.335.80556@wrigleys.postgresql.org>
<5321AAAF.4020207@joh.to>
<5321B217.3080905@joh.to>
<5321B67A.1060507@vmware.com>
<5321B8E0.9040601@joh.to>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 3/13/14 2:55 PM, I wrote:
> On 3/13/14 2:45 PM, Heikki Linnakangas wrote:
>> Good catch! Want to write that into a patch?
>
> I can do it if it helps, but I figured that it's a one-line change,
> perhaps four with a nice comment..
How does the attached look? I've again confirmed that I can't reproduce
the problem locally after applying this patch.
Regards,
Marko Tiikkaja
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugsAttachments:bug9557.patch (text/plain, 1.0K) downloaddiff --git a/src/backend/commands/async.c b/src/backend/commands/async.cindex ef9f09a..5b90c06 100644--- a/src/backend/commands/async.c+++ b/src/backend/commands/async.c@@ -126,6 +126,7 @@
#include "miscadmin.h"
#include "storage/ipc.h"
#include "storage/lmgr.h"
+#include "storage/procarray.h"
#include "storage/procsignal.h"
#include "storage/sinval.h"
#include "tcop/tcopprot.h"
@@ -1978,7 +1979,13 @@ asyncQueueProcessPageEntries(QueuePosition *current,
/* Ignore messages destined for other databases */
if (qe->dboid == MyDatabaseId)
{
- if (TransactionIdDidCommit(qe->xid))+ /*+ * Similarly to the checks in tqual.c we must check if the+ * transaction is still in progress, or we might send a+ * notification emitted from a committed but not yet visible+ * transaction.+ */+ if (!TransactionIdIsInProgress(qe->xid) && TransactionIdDidCommit(qe->xid))
{
/* qe->data is the null-terminated channel name */
char *channel = qe->data;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: marko@joh.to, hlinnakangas@vmware.com
Subject: Re: BUG #9557: Row not visible after receiving notification
In-Reply-To: <5321C508.8090703@joh.to>
References: <20140313093922.335.80556@wrigleys.postgresql.org> <5321AAAF.4020207@joh.to> <5321B217.3080905@joh.to> <5321B67A.1060507@vmware.com> <5321B8E0.9040601@joh.to> <5321C508.8090703@joh.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox