v1-0001-pg17-Fix-ABI-break-by-moving-PROCSIG_SLOTSYNC_MESSAGE-.patch

application/octet-stream

Filename: v1-0001-pg17-Fix-ABI-break-by-moving-PROCSIG_SLOTSYNC_MESSAGE-.patch
Type: application/octet-stream
Part: 0
Message: Re: Use SIGTERM instead of SIGUSR1 for slotsync worker to exit during promotion?

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: Fix ABI break by moving PROCSIG_SLOTSYNC_MESSAGE in ProcSignalReason
File+
src/include/storage/procsignal.h 3 2
From d6ad4847ddbedeafad682653d30eaaf0ad8dedb7 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Wed, 8 Apr 2026 12:53:23 +0900
Subject: [PATCH v1] Fix ABI break by moving PROCSIG_SLOTSYNC_MESSAGE in
 ProcSignalReason

Commit 58c1188a3ea added PROCSIG_SLOTSYNC_MESSAGE in the middle of
enum ProcSignalReason, breaking the ABI.

Fix this by moving PROCSIG_SLOTSYNC_MESSAGE to the end of the enum.

Per buildfarm member crake.

Discussion: https://postgr.es/m/CAHGQGwH_AAbtsiYDJt65N7_4PJ0CgOJmBEaCq68e5_tcuG_vXw@mail.gmail.com
---
 src/include/storage/procsignal.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/include/storage/procsignal.h b/src/include/storage/procsignal.h
index 126c44bcf1d..db59d266a2c 100644
--- a/src/include/storage/procsignal.h
+++ b/src/include/storage/procsignal.h
@@ -36,7 +36,6 @@ typedef enum
 	PROCSIG_BARRIER,			/* global barrier interrupt  */
 	PROCSIG_LOG_MEMORY_CONTEXT, /* ask backend to log the memory contexts */
 	PROCSIG_PARALLEL_APPLY_MESSAGE, /* Message from parallel apply workers */
-	PROCSIG_SLOTSYNC_MESSAGE,	/* ask slot synchronization to stop */
 
 	/* Recovery conflict reasons */
 	PROCSIG_RECOVERY_CONFLICT_FIRST,
@@ -49,9 +48,11 @@ typedef enum
 	PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK,
 	PROCSIG_RECOVERY_CONFLICT_LAST = PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK,
 
-	NUM_PROCSIGNALS				/* Must be last! */
+	PROCSIG_SLOTSYNC_MESSAGE	/* ask slot synchronization to stop */
 } ProcSignalReason;
 
+#define NUM_PROCSIGNALS (PROCSIG_SLOTSYNC_MESSAGE + 1)
+
 typedef enum
 {
 	PROCSIGNAL_BARRIER_SMGRRELEASE, /* ask smgr to close files */
-- 
2.51.2