postgresql/src/backend
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
..
access Remove configure --disable-float4-byval 2019-11-21 18:29:21 +01:00
bootstrap Remove configure --disable-float4-byval 2019-11-21 18:29:21 +01:00
catalog Add object TRUNCATE hook 2019-11-23 10:39:20 -05:00
commands Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. 2019-11-24 14:42:59 -05:00
executor Always call ExecShutdownNode() if appropriate. 2019-11-16 10:11:30 +13:00
foreign Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
jit Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
lib Make StringInfo available to frontend code. 2019-11-05 14:56:40 -08:00
libpq Avoid downcasing/truncation of RADIUS authentication parameters. 2019-11-13 13:41:04 -05:00
main Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
nodes Introduce the 'force' option for the Drop Database command. 2019-11-13 08:25:33 +05:30
optimizer Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
parser Allow ALTER VIEW command to rename the column in the view. 2019-11-21 19:55:13 +09:00
partitioning Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
po Translation updates 2019-06-17 15:30:20 +02:00
port Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
postmaster Avoid using SplitIdentifierString to parse ListenAddresses, too. 2019-11-13 13:51:58 -05:00
regex Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
replication Fix bogus tuple-slot management in logical replication UPDATE handling. 2019-11-22 11:31:19 -05:00
rewrite Defend against self-referential views in relation_is_updatable(). 2019-11-21 16:21:43 -05:00
snowball Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
statistics Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
storage Introduce the 'force' option for the Drop Database command. 2019-11-13 08:25:33 +05:30
tcop Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. 2019-11-24 14:42:59 -05:00
tsearch Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
utils Remove debugging aid 2019-11-23 13:19:20 -03:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
nls.mk Translation updates 2019-05-20 16:00:53 +02:00