Re: NOTIFY in multi-statement PQexec() not sent outside of transaction - Mailing list pgsql-bugs

From Tom Lane
Subject Re: NOTIFY in multi-statement PQexec() not sent outside of transaction
Date
Msg-id 14161.1587411720@sss.pgh.pa.us
Whole thread Raw
In response to Re: NOTIFY in multi-statement PQexec() not sent outside of transaction  (John Muehlhausen <jgm@jgm.org>)
Responses Re: NOTIFY in multi-statement PQexec() not sent outside of transaction
List pgsql-bugs
John Muehlhausen <jgm@jgm.org> writes:
> Wrapping the notify in a transaction does not fix it.  Shouldn't the notify
> be available as soon as the containing transaction is committed?

A notify message will be sent to the client when the backend is
(a) idle (*not* in the middle of processing a transaction string) and
(b) not in an open transaction.

You appear to be unhappy with point (a), but I think changing that
would break more clients than it fixes.  It's intentional that
we don't send notifies mid-command, and this sure looks like a
variant of mid-command from here.

            regards, tom lane



pgsql-bugs by date:

Previous
From: John Muehlhausen
Date:
Subject: Re: NOTIFY in multi-statement PQexec() not sent outside of transaction
Next
From: John Muehlhausen
Date:
Subject: Re: NOTIFY in multi-statement PQexec() not sent outside of transaction