From aab17eca7eda5c6bd000c52c1913328a0df061eb Mon Sep 17 00:00:00 2001 From: Ashwin Agrawal and Xin Zhang Date: Wed, 22 Feb 2017 11:57:20 -0800 Subject: [PATCH] Move ShutdownXLOG() to checkpoint process BgWriter no more has pendingOpsTable, hence it should not call the CreateCheckPoint() directly. Error message was introduced in upstream ef07221997eee08bbe6e541934a9e0d5a62e13ff, and the refactoring of ShutdownXLOG() was introduced in upstream 806a2aee3791244bf0f916729bfdb5489936e068. --- src/backend/postmaster/bgwriter.c | 2 -- src/backend/postmaster/checkpoint.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/postmaster/bgwriter.c b/src/backend/postmaster/bgwriter.c index d7c230a47d..eef7451b7e 100644 --- a/src/backend/postmaster/bgwriter.c +++ b/src/backend/postmaster/bgwriter.c @@ -316,8 +316,6 @@ BackgroundWriterMain(void) * control back to the sigsetjmp block above */ ExitOnAnyError = true; - /* Close down the database */ - ShutdownXLOG(0, 0); DumpFreeSpaceMap(0, 0); /* Normal exit from the bgwriter server is here */ diff --git a/src/backend/postmaster/checkpoint.c b/src/backend/postmaster/checkpoint.c index e0a1917a1e..22a4bfbc56 100755 --- a/src/backend/postmaster/checkpoint.c +++ b/src/backend/postmaster/checkpoint.c @@ -361,6 +361,8 @@ CheckpointMain(void) * control back to the sigsetjmp block above */ ExitOnAnyError = true; + /* Close down the database */ + ShutdownXLOG(0, 0); /* Normal exit from the checkpoint server is here */ if (Debug_print_server_processes || -- GitLab