Re: BUG #14830: Missed NOTIFications, PostgreSQL 9.1.24
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Marko Tiikkaja <marko@joh.to>,
Michael Paquier <michael.paquier@gmail.com>,
PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Date: 2017-10-10T21:25:24Z
Lists: pgsql-bugs
I wrote: > Concretely, I suggest the attached patch. I tried Marko's testbed > against this, and it seems indeed a bit faster than before --- > running it for 100000 notifies takes about 19.25 seconds, rather than > 19.5 seconds with HEAD. But the testbed is probably about the best > case because it has a bunch of threads sending notifies to one > receiver, so that the receiver is quite likely to have multiple > messages to read at a time. OTOH, in a situation where the NOTIFY > traffic isn't so high, it probably hardly matters anyway. It occurred to me that it's easy to measure the worst case, ie always one message per notify interrupt: $ cat bnch.txt LISTEN foo\; NOTIFY foo; $ pgbench -n -c 1 -T 10 -f bnch.txt On this case it seems that the patch is circa 2% slower than HEAD, though that's only barely above the noise level in my measurements. I think that's probably acceptable. regards, tom lane
Commits
-
Fix low-probability loss of NOTIFY messages due to XID wraparound.
- 525b09adae78 9.2.24 landed
- f4cdf781a1d2 10.1 landed
- 7573d122f157 9.3.20 landed
- 69bc245d9296 9.5.10 landed
- 36c687a22f49 9.6.6 landed
- 118e99c3d71e 11.0 landed
- 0e84f70752cf 9.4.15 landed