v1-0001-Update-checkpointer-config-even-during-fast-check.patch

text/x-patch

Filename: v1-0001-Update-checkpointer-config-even-during-fast-check.patch
Type: text/x-patch
Part: 0
Message: Re: sync_standbys_defined and pg_stat_replication

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v1-0001
Subject: Update checkpointer config even during fast checkpoint
File+
src/backend/postmaster/checkpointer.c 8 8
From e3b484b76f9bb2e846a07d85aad595f977c9b7ad Mon Sep 17 00:00:00 2001
From: Ants Aasma <ants@cybertec.at>
Date: Wed, 8 Oct 2025 19:59:00 +0300
Subject: [PATCH v1] Update checkpointer config even during fast checkpoint

Updating synchronous replication and full page write status should not
take long so there is no good reason to postpone it.
---
 src/backend/postmaster/checkpointer.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c
index e84e8663e96..be4b24b078c 100644
--- a/src/backend/postmaster/checkpointer.c
+++ b/src/backend/postmaster/checkpointer.c
@@ -790,6 +790,14 @@ CheckpointWriteDelay(int flags, double progress)
 	if (!AmCheckpointerProcess())
 		return;
 
+	if (ConfigReloadPending)
+	{
+		ConfigReloadPending = false;
+		ProcessConfigFile(PGC_SIGHUP);
+		/* update shmem copies of config variables */
+		UpdateSharedMemoryConfig();
+	}
+
 	/*
 	 * Perform the usual duties and take a nap, unless we're behind schedule,
 	 * in which case we just try to catch up as quickly as possible.
@@ -800,14 +808,6 @@ CheckpointWriteDelay(int flags, double progress)
 		!FastCheckpointRequested() &&
 		IsCheckpointOnSchedule(progress))
 	{
-		if (ConfigReloadPending)
-		{
-			ConfigReloadPending = false;
-			ProcessConfigFile(PGC_SIGHUP);
-			/* update shmem copies of config variables */
-			UpdateSharedMemoryConfig();
-		}
-
 		AbsorbSyncRequests();
 		absorb_counter = WRITES_PER_ABSORB;
 
-- 
2.48.1