postgresql/src
Tom Lane 7900269724 Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery.
This patch ensures that, if any notify messages were received during
a just-finished transaction, they get sent to the frontend just before
not just after the ReadyForQuery message.  With libpq and other client
libraries that act similarly, this guarantees that the client will see
the notify messages as available as soon as it thinks the transaction
is done.

This probably makes no difference in practice, since in realistic
use-cases the application would have to cope with asynchronous
arrival of notify events anyhow.  However, it makes it a lot easier
to build cross-session-notify test cases with stable behavior.
I'm a bit surprised now that we've not seen any buildfarm instability
with the test cases added by commit b10f40bf0.  Tests that I intend
to add in an upcoming bug fix are definitely unstable without this.

Back-patch to 9.6, which is as far back as we can do NOTIFY testing
with the isolationtester infrastructure.

Discussion: https://postgr.es/m/13881.1574557302@sss.pgh.pa.us
2019-11-24 14:42:59 -05:00
..
backend Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. 2019-11-24 14:42:59 -05:00
bin Make psql redisplay the query buffer after \e. 2019-11-22 17:07:54 -05:00
common Make StringInfo available to frontend code. 2019-11-05 14:56:40 -08:00
fe_utils Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
include Stabilize the results of pg_notification_queue_usage(). 2019-11-24 14:09:33 -05:00
interfaces Fix ecpglib.h to declare bool consistently with c.h. 2019-11-12 13:00:04 -05:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
pl Avoid taking a new snapshot for an immutable simple expression in plpgsql. 2019-11-22 15:02:18 -05:00
port Remove a couple of unnecessary if-tests. 2019-11-24 12:03:16 -05:00
template Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
test Add test coverage for "unchanged toast column" replication code path. 2019-11-22 12:52:26 -05:00
timezone Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
tools Remove configure --disable-float4-byval 2019-11-21 18:29:21 +01:00
tutorial Add .gitignore to src/tutorial/ 2019-11-22 21:14:54 +09:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
Makefile.shlib Clean up MinGW def file generation 2019-10-20 10:19:13 +02:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00