From 3263de18f2d37d08ca2e70893aa8529fb64b8df0 Mon Sep 17 00:00:00 2001 From: Mason Sharp Date: Fri, 15 May 2026 17:17:55 -0700 Subject: [PATCH] Remove checkpoint hook patch; no longer used --- patches/15/pg15-040-checkpoint-hook.diff | 48 ------------------------ patches/16/pg16-040-checkpoint-hook.diff | 48 ------------------------ patches/17/pg17-040-checkpoint-hook.diff | 48 ------------------------ patches/18/pg18-040-checkpoint-hook.diff | 48 ------------------------ 4 files changed, 192 deletions(-) delete mode 100644 patches/15/pg15-040-checkpoint-hook.diff delete mode 100644 patches/16/pg16-040-checkpoint-hook.diff delete mode 100644 patches/17/pg17-040-checkpoint-hook.diff delete mode 100644 patches/18/pg18-040-checkpoint-hook.diff diff --git a/patches/15/pg15-040-checkpoint-hook.diff b/patches/15/pg15-040-checkpoint-hook.diff deleted file mode 100644 index e9a5cf19..00000000 --- a/patches/15/pg15-040-checkpoint-hook.diff +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c -index 287339b7fae..fc2fb64d065 100644 ---- a/src/backend/access/transam/xlog.c -+++ b/src/backend/access/transam/xlog.c -@@ -156,6 +156,12 @@ int wal_segment_size = DEFAULT_XLOG_SEG_SIZE; - */ - int CheckPointSegments; - -+/* -+ * Hook called during checkpoint processing, after buffers have been -+ * flushed, but before fsync/sync is done. -+ */ -+Checkpoint_hook_type Checkpoint_hook = NULL; -+ - /* Estimated distance between checkpoints, in bytes */ - static double CheckPointDistanceEstimate = 0; - static double PrevCheckPointDistance = 0; -@@ -7517,6 +7523,12 @@ CheckPointGuts(XLogRecPtr checkPointRedo, int flags) - CheckPointPredicate(); - CheckPointBuffers(flags); - -+ /* -+ * Hook invoked between buffer flush and fsync/sync phase. -+ */ -+ if (Checkpoint_hook) -+ Checkpoint_hook(checkPointRedo, flags); -+ - /* Perform all queued up fsyncs */ - TRACE_POSTGRESQL_BUFFER_CHECKPOINT_SYNC_START(); - CheckpointStats.ckpt_sync_t = GetCurrentTimestamp(); -diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h -index 2c507ea618c..88d65c01286 100644 ---- a/src/include/access/xlog.h -+++ b/src/include/access/xlog.h -@@ -196,6 +196,13 @@ typedef enum WALAvailability - struct XLogRecData; - struct XLogReaderState; - -+/* -+ * Hook called during checkpoint processing, after buffers have been -+ * flushed, but before fsync/sync is done. -+ */ -+typedef void (*Checkpoint_hook_type)(XLogRecPtr checkPointRedo, int flags); -+extern PGDLLIMPORT Checkpoint_hook_type Checkpoint_hook; -+ - extern XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata, - XLogRecPtr fpw_lsn, - uint8 flags, diff --git a/patches/16/pg16-040-checkpoint-hook.diff b/patches/16/pg16-040-checkpoint-hook.diff deleted file mode 100644 index e9a5cf19..00000000 --- a/patches/16/pg16-040-checkpoint-hook.diff +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c -index 287339b7fae..fc2fb64d065 100644 ---- a/src/backend/access/transam/xlog.c -+++ b/src/backend/access/transam/xlog.c -@@ -156,6 +156,12 @@ int wal_segment_size = DEFAULT_XLOG_SEG_SIZE; - */ - int CheckPointSegments; - -+/* -+ * Hook called during checkpoint processing, after buffers have been -+ * flushed, but before fsync/sync is done. -+ */ -+Checkpoint_hook_type Checkpoint_hook = NULL; -+ - /* Estimated distance between checkpoints, in bytes */ - static double CheckPointDistanceEstimate = 0; - static double PrevCheckPointDistance = 0; -@@ -7517,6 +7523,12 @@ CheckPointGuts(XLogRecPtr checkPointRedo, int flags) - CheckPointPredicate(); - CheckPointBuffers(flags); - -+ /* -+ * Hook invoked between buffer flush and fsync/sync phase. -+ */ -+ if (Checkpoint_hook) -+ Checkpoint_hook(checkPointRedo, flags); -+ - /* Perform all queued up fsyncs */ - TRACE_POSTGRESQL_BUFFER_CHECKPOINT_SYNC_START(); - CheckpointStats.ckpt_sync_t = GetCurrentTimestamp(); -diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h -index 2c507ea618c..88d65c01286 100644 ---- a/src/include/access/xlog.h -+++ b/src/include/access/xlog.h -@@ -196,6 +196,13 @@ typedef enum WALAvailability - struct XLogRecData; - struct XLogReaderState; - -+/* -+ * Hook called during checkpoint processing, after buffers have been -+ * flushed, but before fsync/sync is done. -+ */ -+typedef void (*Checkpoint_hook_type)(XLogRecPtr checkPointRedo, int flags); -+extern PGDLLIMPORT Checkpoint_hook_type Checkpoint_hook; -+ - extern XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata, - XLogRecPtr fpw_lsn, - uint8 flags, diff --git a/patches/17/pg17-040-checkpoint-hook.diff b/patches/17/pg17-040-checkpoint-hook.diff deleted file mode 100644 index e9a5cf19..00000000 --- a/patches/17/pg17-040-checkpoint-hook.diff +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c -index 287339b7fae..fc2fb64d065 100644 ---- a/src/backend/access/transam/xlog.c -+++ b/src/backend/access/transam/xlog.c -@@ -156,6 +156,12 @@ int wal_segment_size = DEFAULT_XLOG_SEG_SIZE; - */ - int CheckPointSegments; - -+/* -+ * Hook called during checkpoint processing, after buffers have been -+ * flushed, but before fsync/sync is done. -+ */ -+Checkpoint_hook_type Checkpoint_hook = NULL; -+ - /* Estimated distance between checkpoints, in bytes */ - static double CheckPointDistanceEstimate = 0; - static double PrevCheckPointDistance = 0; -@@ -7517,6 +7523,12 @@ CheckPointGuts(XLogRecPtr checkPointRedo, int flags) - CheckPointPredicate(); - CheckPointBuffers(flags); - -+ /* -+ * Hook invoked between buffer flush and fsync/sync phase. -+ */ -+ if (Checkpoint_hook) -+ Checkpoint_hook(checkPointRedo, flags); -+ - /* Perform all queued up fsyncs */ - TRACE_POSTGRESQL_BUFFER_CHECKPOINT_SYNC_START(); - CheckpointStats.ckpt_sync_t = GetCurrentTimestamp(); -diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h -index 2c507ea618c..88d65c01286 100644 ---- a/src/include/access/xlog.h -+++ b/src/include/access/xlog.h -@@ -196,6 +196,13 @@ typedef enum WALAvailability - struct XLogRecData; - struct XLogReaderState; - -+/* -+ * Hook called during checkpoint processing, after buffers have been -+ * flushed, but before fsync/sync is done. -+ */ -+typedef void (*Checkpoint_hook_type)(XLogRecPtr checkPointRedo, int flags); -+extern PGDLLIMPORT Checkpoint_hook_type Checkpoint_hook; -+ - extern XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata, - XLogRecPtr fpw_lsn, - uint8 flags, diff --git a/patches/18/pg18-040-checkpoint-hook.diff b/patches/18/pg18-040-checkpoint-hook.diff deleted file mode 100644 index e9a5cf19..00000000 --- a/patches/18/pg18-040-checkpoint-hook.diff +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c -index 287339b7fae..fc2fb64d065 100644 ---- a/src/backend/access/transam/xlog.c -+++ b/src/backend/access/transam/xlog.c -@@ -156,6 +156,12 @@ int wal_segment_size = DEFAULT_XLOG_SEG_SIZE; - */ - int CheckPointSegments; - -+/* -+ * Hook called during checkpoint processing, after buffers have been -+ * flushed, but before fsync/sync is done. -+ */ -+Checkpoint_hook_type Checkpoint_hook = NULL; -+ - /* Estimated distance between checkpoints, in bytes */ - static double CheckPointDistanceEstimate = 0; - static double PrevCheckPointDistance = 0; -@@ -7517,6 +7523,12 @@ CheckPointGuts(XLogRecPtr checkPointRedo, int flags) - CheckPointPredicate(); - CheckPointBuffers(flags); - -+ /* -+ * Hook invoked between buffer flush and fsync/sync phase. -+ */ -+ if (Checkpoint_hook) -+ Checkpoint_hook(checkPointRedo, flags); -+ - /* Perform all queued up fsyncs */ - TRACE_POSTGRESQL_BUFFER_CHECKPOINT_SYNC_START(); - CheckpointStats.ckpt_sync_t = GetCurrentTimestamp(); -diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h -index 2c507ea618c..88d65c01286 100644 ---- a/src/include/access/xlog.h -+++ b/src/include/access/xlog.h -@@ -196,6 +196,13 @@ typedef enum WALAvailability - struct XLogRecData; - struct XLogReaderState; - -+/* -+ * Hook called during checkpoint processing, after buffers have been -+ * flushed, but before fsync/sync is done. -+ */ -+typedef void (*Checkpoint_hook_type)(XLogRecPtr checkPointRedo, int flags); -+extern PGDLLIMPORT Checkpoint_hook_type Checkpoint_hook; -+ - extern XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata, - XLogRecPtr fpw_lsn, - uint8 flags,