From 4fe66e6ff6c1613725252fedc6eb394a3d8ff49b Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Wed, 18 Feb 2009 11:10:55 +0000 Subject: [PATCH] Move check if (shutdown_requested) inside recoveryStopsHere() so that it occurs immediately after CHECK_FOR_INTERRUPTS. This also allows startup process to shutdown correctly when recovery is paused. --- src/backend/access/transam/xlog.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 39df968fff..7bbae2d369 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5003,6 +5003,13 @@ recoveryStopsHere(XLogRecord *record, bool *includeThis) CHECK_FOR_INTERRUPTS(); + /* + * Check if we were requested to exit without finishing + * recovery. + */ + if (shutdown_requested) + proc_exit(0); + /* * Let's see if user has updated our recoveryTargetMode. */ @@ -5970,13 +5977,6 @@ StartupXLOG(void) } #endif - /* - * Check if we were requested to exit without finishing - * recovery. - */ - if (shutdown_requested) - proc_exit(0); - /* * Have we reached our safe starting point? If so, we can * tell postmaster that the database is consistent now. -- 2.39.5