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, 10 insertions, 1 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 28055680aad..8dab9fd5780 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -2865,6 +2865,9 @@ die(SIGNAL_ARGS)
ProcDiePending = true;
}
+ /* for the statistics collector */
+ pgStatSessionEndCause = DISCONNECT_KILLED;
+
/* If we're still here, waken anything waiting on the process latch */
SetLatch(MyLatch);
@@ -4579,9 +4582,15 @@ PostgresMain(int argc, char *argv[],
* means unexpected loss of frontend connection. Either way,
* perform normal shutdown.
*/
- case 'X':
case EOF:
+ /* for the statistics collector */
+ pgStatSessionEndCause = DISCONNECT_CLIENT_EOF;
+
+ /* FALLTHROUGH */
+
+ case 'X':
+
/*
* Reset whereToSendOutput to prevent ereport from attempting
* to send any more messages to client.