aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/xlogwait.h89
-rw-r--r--src/include/catalog/catversion.h2
-rw-r--r--src/include/catalog/pg_proc.dat11
-rw-r--r--src/include/lib/pairingheap.h3
-rw-r--r--src/include/storage/lwlocklist.h1
5 files changed, 1 insertions, 105 deletions
diff --git a/src/include/access/xlogwait.h b/src/include/access/xlogwait.h
deleted file mode 100644
index a77635eb97c..00000000000
--- a/src/include/access/xlogwait.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * xlogwait.h
- * Declarations for LSN replay waiting routines.
- *
- * Copyright (c) 2024, PostgreSQL Global Development Group
- *
- * src/include/access/xlogwait.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef XLOG_WAIT_H
-#define XLOG_WAIT_H
-
-#include "lib/pairingheap.h"
-#include "postgres.h"
-#include "port/atomics.h"
-#include "storage/procnumber.h"
-#include "storage/spin.h"
-#include "tcop/dest.h"
-
-/*
- * WaitLSNProcInfo - the shared memory structure representing information
- * about the single process, which may wait for LSN replay. An item of
- * waitLSN->procInfos array.
- */
-typedef struct WaitLSNProcInfo
-{
- /* LSN, which this process is waiting for */
- XLogRecPtr waitLSN;
-
- /* Process to wake up once the waitLSN is replayed */
- ProcNumber procno;
-
- /* A pairing heap node for participation in waitLSNState->waitersHeap */
- pairingheap_node phNode;
-
- /*
- * A flag indicating that this item is present in
- * waitLSNState->waitersHeap
- */
- bool inHeap;
-} WaitLSNProcInfo;
-
-/*
- * WaitLSNState - the shared memory state for the replay LSN waiting facility.
- */
-typedef struct WaitLSNState
-{
- /*
- * The minimum LSN value some process is waiting for. Used for the
- * fast-path checking if we need to wake up any waiters after replaying a
- * WAL record. Could be read lock-less. Update protected by WaitLSNLock.
- */
- pg_atomic_uint64 minWaitedLSN;
-
- /*
- * A pairing heap of waiting processes order by LSN values (least LSN is
- * on top). Protected by WaitLSNLock.
- */
- pairingheap waitersHeap;
-
- /*
- * An array with per-process information, indexed by the process number.
- * Protected by WaitLSNLock.
- */
- WaitLSNProcInfo procInfos[FLEXIBLE_ARRAY_MEMBER];
-} WaitLSNState;
-
-/*
- * Result statuses for WaitForLSNReplay().
- */
-typedef enum
-{
- WAIT_LSN_RESULT_SUCCESS, /* Target LSN is reached */
- WAIT_LSN_RESULT_TIMEOUT, /* Timeout occurred */
- WAIT_LSN_RESULT_NOT_IN_RECOVERY, /* Recovery ended before or during our
- * wait */
-} WaitLSNResult;
-
-extern PGDLLIMPORT WaitLSNState *waitLSNState;
-
-extern Size WaitLSNShmemSize(void);
-extern void WaitLSNShmemInit(void);
-extern void WaitLSNWakeup(XLogRecPtr currentLSN);
-extern void WaitLSNCleanup(void);
-extern WaitLSNResult WaitForLSNReplay(XLogRecPtr targetLSN, int64 timeout);
-
-#endif /* XLOG_WAIT_H */
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index e968e915e99..993e6991274 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -57,6 +57,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 202411011
+#define CATALOG_VERSION_NO 202411042
#endif
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index a38e20f5d90..f23321a41f1 100644
--- a/src/include/catalog/pg_proc.dat
+++ b/src/include/catalog/pg_proc.dat
@@ -6665,17 +6665,6 @@
prorettype => 'text', proargtypes => '',
prosrc => 'pg_get_wal_replay_pause_state' },
-{ oid => '8593',
- descr => 'wait for the target LSN to be replayed on standby with an optional timeout',
- proname => 'pg_wal_replay_wait', prokind => 'p', prorettype => 'void',
- proargtypes => 'pg_lsn int8 bool', proargnames => '{target_lsn,timeout,no_error}',
- prosrc => 'pg_wal_replay_wait' },
-{ oid => '8594',
- descr => 'the last result for pg_wal_replay_wait()',
- proname => 'pg_wal_replay_wait_status', prorettype => 'text',
- proargtypes => '',
- prosrc => 'pg_wal_replay_wait_status' },
-
{ oid => '6224', descr => 'get resource managers loaded in system',
proname => 'pg_get_wal_resource_managers', prorows => '50', proretset => 't',
provolatile => 'v', prorettype => 'record', proargtypes => '',
diff --git a/src/include/lib/pairingheap.h b/src/include/lib/pairingheap.h
index 9e1c26033a1..7eade81535a 100644
--- a/src/include/lib/pairingheap.h
+++ b/src/include/lib/pairingheap.h
@@ -77,9 +77,6 @@ typedef struct pairingheap
extern pairingheap *pairingheap_allocate(pairingheap_comparator compare,
void *arg);
-extern void pairingheap_initialize(pairingheap *heap,
- pairingheap_comparator compare,
- void *arg);
extern void pairingheap_free(pairingheap *heap);
extern void pairingheap_add(pairingheap *heap, pairingheap_node *node);
extern pairingheap_node *pairingheap_first(pairingheap *heap);
diff --git a/src/include/storage/lwlocklist.h b/src/include/storage/lwlocklist.h
index 88dc79b2bd6..6a2f64c54fb 100644
--- a/src/include/storage/lwlocklist.h
+++ b/src/include/storage/lwlocklist.h
@@ -83,4 +83,3 @@ PG_LWLOCK(49, WALSummarizer)
PG_LWLOCK(50, DSMRegistry)
PG_LWLOCK(51, InjectionPoint)
PG_LWLOCK(52, SerialControl)
-PG_LWLOCK(53, WaitLSN)