aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2022-08-22 20:25:42 -0700
committerAndres Freund <andres@anarazel.de>2022-08-22 20:25:42 -0700
commit1bdd54e662d58ed49448255a004b668b56bae100 (patch)
treed6d63dfe1fa5ecb257ba354d3640ff616eb3efbb
parent0c679464a837079acc75ff1d45eaa83f79e05690 (diff)
downloadpostgresql-1bdd54e662d58ed49448255a004b668b56bae100.tar.gz
postgresql-1bdd54e662d58ed49448255a004b668b56bae100.zip
Remove redundant call to pgstat_report_wal()
pgstat_report_stat() will be called before shutdown so an explicit call to pgstat_report_wal() just before shutdown is redundant. This likely was not redundant before 5891c7a8ed8, but now it clearly is. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/CAAKRu_aaq33UnG4TXq3S-OSXGWj1QGf0sU%2BECH4tNwGFNERkZA%40mail.gmail.com
-rw-r--r--src/backend/postmaster/walwriter.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/backend/postmaster/walwriter.c b/src/backend/postmaster/walwriter.c
index e926f8c27c7..beb46dcb55c 100644
--- a/src/backend/postmaster/walwriter.c
+++ b/src/backend/postmaster/walwriter.c
@@ -293,18 +293,7 @@ HandleWalWriterInterrupts(void)
}
if (ShutdownRequestPending)
- {
- /*
- * Force reporting remaining WAL statistics at process exit.
- *
- * Since pgstat_report_wal is invoked with 'force' is false in main
- * loop to avoid overloading the cumulative stats system, there may
- * exist unreported stats counters for the WAL writer.
- */
- pgstat_report_wal(true);
-
proc_exit(0);
- }
/* Perform logging of memory contexts of this process */
if (LogMemoryContextPending)