aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index d7a72c0766b..3b85e48333d 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -4194,7 +4194,18 @@ PostgresMain(int argc, char *argv[],
}
else
{
+ /* Send out notify signals and transmit self-notifies */
ProcessCompletedNotifies();
+
+ /*
+ * Also process incoming notifies, if any. This is mostly to
+ * ensure stable behavior in tests: if any notifies were
+ * received during the just-finished transaction, they'll be
+ * seen by the client before ReadyForQuery is.
+ */
+ if (notifyInterruptPending)
+ ProcessNotifyInterrupt();
+
pgstat_report_stat(false);
set_ps_display("idle", false);