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

From RekGRpth
Subject Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand
Date
Msg-id CAPgh2mJihkT=nUZePekD3odGBKc4qhdUDY4-=37yf2tfd5BEYA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifies after CommitTransactionCommand  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-bugs
No, it doesn't. The quote from official documentation: "NOTIFY interacts with SQL transactions in some important ways. Firstly, if a NOTIFY is executed inside a transaction, the notify events are not delivered until and unless the transaction is committed." And nothing about any "idle"!

And how about several transaction in new procedures?

with bst regrds, Rek>pth


пт, 14 февр. 2020 г. в 22:31, Tom Lane <tgl@sss.pgh.pa.us>:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
>> пт, 14 февр. 2020 г. в 20:36, Tom Lane <tgl@sss.pgh.pa.us>:
>>> 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?

Sure.  "idle" here means that the backend is done with the current
command from the client.  I think the OP's problem largely stems from
trying to do two transactions in one simple-query message, which is
an abuse of that feature to begin with.  (We've discussed taking away
the ability to do that altogether, and while I've resisted that on
backwards-compatibility grounds, it might well happen someday.)

                        regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16259: Cannot Use "pg_ctl start -l logfile" on Clean Install on Windows Server 2012/2016
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand