Re: NOTIFY does not work as expected - Mailing list pgsql-bugs

From Jeff Janes
Subject Re: NOTIFY does not work as expected
Date
Msg-id CAMkU=1ytid9NHkLpOyu9bgLb47L34WX+KQnfU8KmQGAOAFJ_Zg@mail.gmail.com
Whole thread Raw
In response to NOTIFY does not work as expected  (Andrey <parihaaraka@gmail.com>)
Responses Re: NOTIFY does not work as expected
Re: NOTIFY does not work as expected
List pgsql-bugs
On Mon, Jul 2, 2018 at 4:33 PM, Andrey <parihaaraka@gmail.com> wrote:
PostgreSQL 9.6.9, 10.4 (broken):
A: listen test;
A: select pg_sleep(5);
    1
    2
B: notify test, 'test1';
    3
    4
    5
A: done
    6
    7
    8
    9
B: notify test, 'test2';
A:
* notification received:
  server process id: 2837
  channel: test
  payload: test
* notification received:
  server process id: 2837
  channel: test
  payload: test2

PostgreSQL 9.6.2 and earlier (workds as expected)
A: listen test;
A: select pg_sleep(5);
    1
    2
B: notify test, 'test1';
    3
    4
    5
A: done
A:
* notification received:
  server process id: 2837
  channel: test
  payload: test
    6
    7
    8
    9
B: notify test, 'test2';
A:
* notification received:
  server process id: 2837
  channel: test
  payload: test2

I don't think this is a bug.   I don't see that the docs promise one behavior over the other, so it is really a dealer's choice.  Also, I can't reliably reproduce the reported 9.6.2 behavior on my own 9.6.2 server.

Cheers,

Jeff

pgsql-bugs by date:

Previous
From: Andrey
Date:
Subject: NOTIFY does not work as expected
Next
From: Andrey
Date:
Subject: Re: NOTIFY does not work as expected