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

From Jeff Janes
Subject Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand
Date
Msg-id CAMkU=1zUxPw7LS2NHwWue8-smtbNZ14HyGoZu-=syzPPbViqpA@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 ProcessCompletedNotifiesafter CommitTransactionCommand  (RekGRpth <rekgrpth@gmail.com>)
List pgsql-bugs
On Sat, Feb 15, 2020 at 4:39 AM RekGRpth <rekgrpth@gmail.com> wrote:

And how about several transaction in new procedures?

That does seem like a legitimate gripe.

create or replace procedure foo() LANGUAGE plpgsql as $$
  begin 
  FOR i IN 1..100 LOOP
    perform pg_notify('channel','HI');
    perform pg_sleep(1); 
    commit;
  end loop;
end; $$;
CALL foo();

An actively polling listener gets all notification all at once at the end.  (I just use psql with a "LISTEN channel;" and the repeatedly execute ";" to get it to poll)

 Cheers,

Jeff

pgsql-bugs by date:

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