Skip to content

Commit 1bdd54e

Browse files
committed
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 5891c7a, 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
1 parent 0c67946 commit 1bdd54e

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/backend/postmaster/walwriter.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -293,18 +293,7 @@ HandleWalWriterInterrupts(void)
293293
}
294294

295295
if (ShutdownRequestPending)
296-
{
297-
/*
298-
* Force reporting remaining WAL statistics at process exit.
299-
*
300-
* Since pgstat_report_wal is invoked with 'force' is false in main
301-
* loop to avoid overloading the cumulative stats system, there may
302-
* exist unreported stats counters for the WAL writer.
303-
*/
304-
pgstat_report_wal(true);
305-
306296
proc_exit(0);
307-
}
308297

309298
/* Perform logging of memory contexts of this process */
310299
if (LogMemoryContextPending)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy