Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifies after CommitTransactionCommand

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: RekGRpth <rekgrpth(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifies after CommitTransactionCommand
Date: 2020-02-15 18:15:50
Message-ID: CAMkU=1zUxPw7LS2NHwWue8-smtbNZ14HyGoZu-=syzPPbViqpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Feb 15, 2020 at 4:39 AM RekGRpth <rekgrpth(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heath Lord 2020-02-16 00:23:11 Re: BUG #16259: Cannot Use "pg_ctl start -l logfile" on Clean Install on Windows Server 2012/2016
Previous Message David G. Johnston 2020-02-15 15:26:46 Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifies after CommitTransactionCommand