Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand
Date
Msg-id CAKFQuwZg50MEY3N9co-9toSy5MvwWQSKvqyUut=RuYgukCMCWA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand  (RekGRpth <rekgrpth@gmail.com>)
Responses Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifies after CommitTransactionCommand  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs

пт, 14 февр. 2020 г. в 20:36, Tom Lane <tgl@sss.pgh.pa.us>:
RekGRpth <rekgrpth@gmail.com> writes:
> No, it wasn't. I listen in another connection and receive both
> notifications but only after 10 seconds!

Doesn't sound like a bug to me.  The sending backend will only
send out notifications when it goes idle

 Does a non-interactive psql session ever go idle mid-script?

On Friday, February 14, 2020, RekGRpth <rekgrpth@gmail.com> wrote:
Ok, thanks. But I expect to receive notification at every transaction commit!
with bst

This seems reasonable on its face and I don’t see any documentation regarding this aspect of timing.  All the docs says is listen/notify only take effect after the transaction they are in commits.  Absent further info one can reasonably assume that they take effect immediately after commit and not at the first idle moment subsequent to the commit.

David J.

pgsql-bugs by date:

Previous
From: RekGRpth
Date:
Subject: Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand
Next
From: Tom Lane
Date:
Subject: Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifies after CommitTransactionCommand