NOTIFY does not work as expected
parihaaraka <parihaaraka@gmail.com>
From: Andrey <parihaaraka@gmail.com>
To: pgsql-bugs@postgresql.org
Date: 2018-07-02T20:33:49Z
Lists: pgsql-bugs
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
----------------
* This is not client-side problem - I've verified it via Wireshark.
** I've caught the bug on Postres Pro Std builds, but according to the fact
that these builds are mostly identical, the bug is related to both of them.
Commits
-
Client-side fixes for delayed NOTIFY receipt.
- ecc59e31a81e 10.6 landed
- d30d27a52818 11.1 landed
- ac3be116a798 9.5.15 landed
- 4247db62522f 12.0 landed
- 34aad21cbf03 9.6.11 landed
-
Server-side fix for delayed NOTIFY and SIGTERM processing.
- f4941666afc6 9.5.15 landed
- cbab94077e12 9.6.11 landed
- 7aaeb7b45ac7 11.1 landed
- 3bdef6d21131 10.6 landed
- 2ddb9149d14d 12.0 landed
-
Introduce and use infrastructure for interrupt processing during client reads.
- 4f85fde8eb86 9.5.0 cited