Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand
Дата
Msg-id CAMkU=1zUxPw7LS2NHwWue8-smtbNZ14HyGoZu-=syzPPbViqpA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand  (RekGRpth <rekgrpth@gmail.com>)
Ответы Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand  (RekGRpth <rekgrpth@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #16258: exec_simple_query does not call ProcessCompletedNotifiesafter CommitTransactionCommand
Следующее
От: Heath Lord
Дата:
Сообщение: Re: BUG #16259: Cannot Use "pg_ctl start -l logfile" on Clean Installon Windows Server 2012/2016