Re: LISTEN/NOTIFY race condition? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: LISTEN/NOTIFY race condition?
Date
Msg-id 3683.1204681994@sss.pgh.pa.us
Whole thread Raw
In response to LISTEN/NOTIFY race condition?  (Laurent Birtz <laurent.birtz@kryptiva.com>)
Responses Re: LISTEN/NOTIFY race condition?  (Laurent Birtz <laurent.birtz@kryptiva.com>)
List pgsql-bugs
Laurent Birtz <laurent.birtz@kryptiva.com> writes:
>  From the observed sequence of events, it would appear that the event
> thread inserts a tuple in the pg_listener table BEFORE the command thread
> actually commits the transaction. However, when this transaction commits,
> Postgres does not actually find the event thread's tuple in this table.

I'm wondering exactly when you commit the LISTEN?  The command thread
can't see the pg_listener tuple until it's committed ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Laurent Birtz
Date:
Subject: LISTEN/NOTIFY race condition?
Next
From: "Jasen Betts"
Date:
Subject: BUG #4010: psql does not honour -c after database name