PostgreSQL Source Code git master
Loading...
Searching...
No Matches
slotsync.h File Reference
#include <signal.h>
#include "replication/walreceiver.h"
Include dependency graph for slotsync.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

charCheckAndGetDbnameFromConninfo (void)
 
bool ValidateSlotSyncParams (int elevel)
 
pg_noreturn void ReplSlotSyncWorkerMain (const void *startup_data, size_t startup_data_len)
 
void ShutDownSlotSync (void)
 
bool SlotSyncWorkerCanRestart (void)
 
bool IsSyncingReplicationSlots (void)
 
void SyncReplicationSlots (WalReceiverConn *wrconn)
 
void HandleSlotSyncMessageInterrupt (void)
 
void ProcessSlotSyncMessage (void)
 

Variables

PGDLLIMPORT bool sync_replication_slots
 
PGDLLIMPORT volatile sig_atomic_t SlotSyncShutdownPending
 
PGDLLIMPORT charPrimaryConnInfo
 
PGDLLIMPORT charPrimarySlotName
 

Function Documentation

◆ CheckAndGetDbnameFromConninfo()

char * CheckAndGetDbnameFromConninfo ( void  )
extern

Definition at line 1158 of file slotsync.c.

1159{
1160 char *dbname;
1161
1162 /*
1163 * The slot synchronization needs a database connection for walrcv_exec to
1164 * work.
1165 */
1167 if (dbname == NULL)
1168 ereport(ERROR,
1170
1171 /*
1172 * translator: first %s is a connection option; second %s is a GUC
1173 * variable name
1174 */
1175 errmsg("replication slot synchronization requires \"%s\" to be specified in \"%s\"",
1176 "dbname", "primary_conninfo"));
1177 return dbname;
1178}
int errcode(int sqlerrcode)
Definition elog.c:875
#define ERROR
Definition elog.h:40
#define ereport(elevel,...)
Definition elog.h:152
static char * errmsg
static int fb(int x)
char * dbname
Definition streamutil.c:49
#define walrcv_get_dbname_from_conninfo(conninfo)
char * PrimaryConnInfo

References dbname, ereport, errcode(), errmsg, ERROR, fb(), PrimaryConnInfo, and walrcv_get_dbname_from_conninfo.

Referenced by pg_sync_replication_slots(), and ReplSlotSyncWorkerMain().

◆ HandleSlotSyncMessageInterrupt()

void HandleSlotSyncMessageInterrupt ( void  )
extern

Definition at line 1338 of file slotsync.c.

1339{
1340 InterruptPending = true;
1342 /* latch will be set by procsignal_sigusr1_handler */
1343}
volatile sig_atomic_t InterruptPending
Definition globals.c:32
volatile sig_atomic_t SlotSyncShutdownPending
Definition slotsync.c:159

References InterruptPending, and SlotSyncShutdownPending.

Referenced by procsignal_sigusr1_handler().

◆ IsSyncingReplicationSlots()

bool IsSyncingReplicationSlots ( void  )
extern

Definition at line 1916 of file slotsync.c.

1917{
1918 return syncing_slots;
1919}
static bool syncing_slots
Definition slotsync.c:152

References syncing_slots.

Referenced by CreateDecodingContext(), GetStandbyFlushRecPtr(), ProcessSlotSyncMessage(), and ReplicationSlotCreate().

◆ ProcessSlotSyncMessage()

void ProcessSlotSyncMessage ( void  )
extern

Definition at line 1354 of file slotsync.c.

1355{
1357
1359 {
1360 ereport(LOG,
1361 errmsg("replication slot synchronization worker will stop because promotion is triggered"));
1362 proc_exit(0);
1363 }
1364 else
1365 {
1366 /*
1367 * If sync has already completed, there is no need to interrupt the
1368 * caller with an error.
1369 */
1371 return;
1372
1373 ereport(ERROR,
1375 errmsg("replication slot synchronization will stop because promotion is triggered"));
1376 }
1377}
#define LOG
Definition elog.h:32
void proc_exit(int code)
Definition ipc.c:105
#define AmLogicalSlotSyncWorkerProcess()
Definition miscadmin.h:392
bool IsSyncingReplicationSlots(void)
Definition slotsync.c:1916

References AmLogicalSlotSyncWorkerProcess, ereport, errcode(), errmsg, ERROR, fb(), IsSyncingReplicationSlots(), LOG, proc_exit(), and SlotSyncShutdownPending.

Referenced by ProcessInterrupts().

◆ ReplSlotSyncWorkerMain()

pg_noreturn void ReplSlotSyncWorkerMain ( const void startup_data,
size_t  startup_data_len 
)
extern

Definition at line 1559 of file slotsync.c.

1560{
1562 char *dbname;
1563 char *err;
1566
1568
1569 /* Release postmaster's working memory context */
1571 {
1574 }
1575
1577
1579
1580 /*
1581 * Create a per-backend PGPROC struct in shared memory. We must do this
1582 * before we access any shared memory.
1583 */
1584 InitProcess();
1585
1586 /*
1587 * Early initialization.
1588 */
1589 BaseInit();
1590
1592
1593 /*
1594 * If an exception is encountered, processing resumes here.
1595 *
1596 * We just need to clean up, report the error, and go away.
1597 *
1598 * If we do not have this handling here, then since this worker process
1599 * operates at the bottom of the exception stack, ERRORs turn into FATALs.
1600 * Therefore, we create our own exception handler to catch ERRORs.
1601 */
1602 if (sigsetjmp(local_sigjmp_buf, 1) != 0)
1603 {
1604 /* since not using PG_TRY, must reset error stack by hand */
1606
1607 /* Prevents interrupts while cleaning up */
1609
1610 /* Report the error to the server log */
1612
1613 /*
1614 * We can now go away. Note that because we called InitProcess, a
1615 * callback was registered to do ProcKill, which will clean up
1616 * necessary state.
1617 */
1618 proc_exit(0);
1619 }
1620
1621 /* We can now handle ereport(ERROR) */
1623
1624 /* Setup signal handling */
1633
1635
1636 ereport(LOG, errmsg("slot sync worker started"));
1637
1638 /* Register it as soon as SlotSyncCtx->pid is initialized. */
1640
1641 /*
1642 * Establishes SIGALRM handler and initialize timeout module. It is needed
1643 * by InitPostgres to register different timeouts.
1644 */
1646
1647 /* Load the libpq-specific functions */
1648 load_file("libpqwalreceiver", false);
1649
1650 /*
1651 * Unblock signals (they were blocked when the postmaster forked us)
1652 */
1654
1655 /*
1656 * Set always-secure search path, so malicious users can't redirect user
1657 * code (e.g. operators).
1658 *
1659 * It's not strictly necessary since we won't be scanning or writing to
1660 * any user table locally, but it's good to retain it here for added
1661 * precaution.
1662 */
1663 SetConfigOption("search_path", "", PGC_SUSET, PGC_S_OVERRIDE);
1664
1666
1667 /*
1668 * Connect to the database specified by the user in primary_conninfo. We
1669 * need a database connection for walrcv_exec to work which we use to
1670 * fetch slot information from the remote node. See comments atop
1671 * libpqrcv_exec.
1672 *
1673 * We do not specify a specific user here since the slot sync worker will
1674 * operate as a superuser. This is safe because the slot sync worker does
1675 * not interact with user tables, eliminating the risk of executing
1676 * arbitrary code within triggers.
1677 */
1679
1681
1683 if (cluster_name[0])
1684 appendStringInfo(&app_name, "%s_%s", cluster_name, "slotsync worker");
1685 else
1686 appendStringInfoString(&app_name, "slotsync worker");
1687
1688 /*
1689 * Establish the connection to the primary server for slot
1690 * synchronization.
1691 */
1692 wrconn = walrcv_connect(PrimaryConnInfo, false, false, false,
1693 app_name.data, &err);
1694
1695 if (!wrconn)
1696 ereport(ERROR,
1698 errmsg("synchronization worker \"%s\" could not connect to the primary server: %s",
1699 app_name.data, err));
1700
1701 pfree(app_name.data);
1702
1703 /*
1704 * Register the disconnection callback.
1705 *
1706 * XXX: This can be combined with previous cleanup registration of
1707 * slotsync_worker_onexit() but that will need the connection to be made
1708 * global and we want to avoid introducing global for this purpose.
1709 */
1711
1712 /*
1713 * Using the specified primary server connection, check that we are not a
1714 * cascading standby and slot configured in 'primary_slot_name' exists on
1715 * the primary server.
1716 */
1718
1719 /* Main loop to synchronize slots */
1720 for (;;)
1721 {
1722 bool some_slot_updated = false;
1723 bool started_tx = false;
1725
1727
1730
1731 /*
1732 * The syscache access in fetch_remote_slots() needs a transaction
1733 * env.
1734 */
1735 if (!IsTransactionState())
1736 {
1738 started_tx = true;
1739 }
1740
1744
1745 if (started_tx)
1747
1749 }
1750
1751 /*
1752 * The slot sync worker can't get here because it will only stop when it
1753 * receives a stop request from the startup process, or when there is an
1754 * error.
1755 */
1756 Assert(false);
1757}
sigset_t UnBlockSig
Definition pqsignal.c:22
#define Assert(condition)
Definition c.h:943
void load_file(const char *filename, bool restricted)
Definition dfmgr.c:149
void EmitErrorReport(void)
Definition elog.c:1883
ErrorContextCallback * error_context_stack
Definition elog.c:100
sigjmp_buf * PG_exception_stack
Definition elog.c:102
void err(int eval, const char *fmt,...)
Definition err.c:43
int MyProcPid
Definition globals.c:49
void SetConfigOption(const char *name, const char *value, GucContext context, GucSource source)
Definition guc.c:4234
@ PGC_S_OVERRIDE
Definition guc.h:123
@ PGC_SUSET
Definition guc.h:78
char * cluster_name
Definition guc_tables.c:582
volatile sig_atomic_t ConfigReloadPending
Definition interrupt.c:27
void SignalHandlerForConfigReload(SIGNAL_ARGS)
Definition interrupt.c:61
void before_shmem_exit(pg_on_exit_callback function, Datum arg)
Definition ipc.c:344
void list_free_deep(List *list)
Definition list.c:1560
void pfree(void *pointer)
Definition mcxt.c:1619
MemoryContext PostmasterContext
Definition mcxt.c:169
void MemoryContextDelete(MemoryContext context)
Definition mcxt.c:475
@ NormalProcessing
Definition miscadmin.h:481
@ InitProcessing
Definition miscadmin.h:480
#define GetProcessingMode()
Definition miscadmin.h:490
#define CHECK_FOR_INTERRUPTS()
Definition miscadmin.h:125
#define HOLD_INTERRUPTS()
Definition miscadmin.h:136
#define SetProcessingMode(mode)
Definition miscadmin.h:492
#define NIL
Definition pg_list.h:68
#define die(msg)
#define pqsignal
Definition port.h:548
#define PG_SIG_IGN
Definition port.h:552
#define PG_SIG_DFL
Definition port.h:551
void FloatExceptionHandler(SIGNAL_ARGS)
Definition postgres.c:3082
void StatementCancelHandler(SIGNAL_ARGS)
Definition postgres.c:3065
uint64_t Datum
Definition postgres.h:70
#define PointerGetDatum(X)
Definition postgres.h:354
#define InvalidOid
void BaseInit(void)
Definition postinit.c:616
void InitPostgres(const char *in_dbname, Oid dboid, const char *username, Oid useroid, uint32 flags, char *out_dbname)
Definition postinit.c:716
void procsignal_sigusr1_handler(SIGNAL_ARGS)
Definition procsignal.c:696
void init_ps_display(const char *fixed_part)
Definition ps_status.c:286
static void slotsync_worker_disconnect(int code, Datum arg)
Definition slotsync.c:1385
static SlotSyncCtxStruct * SlotSyncCtx
Definition slotsync.c:121
char * CheckAndGetDbnameFromConninfo(void)
Definition slotsync.c:1158
static void wait_for_slot_activity(bool some_slot_updated)
Definition slotsync.c:1444
static void slotsync_reread_config(void)
Definition slotsync.c:1254
static void slotsync_worker_onexit(int code, Datum arg)
Definition slotsync.c:1398
static void validate_remote_info(WalReceiverConn *wrconn)
Definition slotsync.c:1080
static void check_and_set_sync_info(pid_t sync_process_pid)
Definition slotsync.c:1479
static List * fetch_remote_slots(WalReceiverConn *wrconn, List *slot_names)
Definition slotsync.c:901
static bool synchronize_slots(WalReceiverConn *wrconn, List *remote_slot_list, bool *slot_persistence_pending)
Definition slotsync.c:1044
void InitProcess(void)
Definition proc.c:392
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition stringinfo.c:145
void appendStringInfoString(StringInfo str, const char *s)
Definition stringinfo.c:230
void initStringInfo(StringInfo str)
Definition stringinfo.c:97
Definition pg_list.h:54
void InitializeTimeouts(void)
Definition timeout.c:470
static WalReceiverConn * wrconn
Definition walreceiver.c:95
#define walrcv_connect(conninfo, replication, logical, must_use_password, appname, err)
#define SIGCHLD
Definition win32_port.h:168
#define SIGHUP
Definition win32_port.h:158
#define SIGPIPE
Definition win32_port.h:163
#define SIGUSR1
Definition win32_port.h:170
#define SIGUSR2
Definition win32_port.h:171
bool IsTransactionState(void)
Definition xact.c:389
void StartTransactionCommand(void)
Definition xact.c:3109
void CommitTransactionCommand(void)
Definition xact.c:3207

References appendStringInfo(), appendStringInfoString(), Assert, BaseInit(), before_shmem_exit(), check_and_set_sync_info(), CHECK_FOR_INTERRUPTS, CheckAndGetDbnameFromConninfo(), cluster_name, CommitTransactionCommand(), ConfigReloadPending, dbname, die, EmitErrorReport(), ereport, err(), errcode(), errmsg, ERROR, error_context_stack, fb(), fetch_remote_slots(), FloatExceptionHandler(), GetProcessingMode, HOLD_INTERRUPTS, init_ps_display(), InitializeTimeouts(), InitPostgres(), InitProcess(), InitProcessing, initStringInfo(), InvalidOid, IsTransactionState(), list_free_deep(), load_file(), LOG, MemoryContextDelete(), MyProcPid, NIL, NormalProcessing, pfree(), PG_exception_stack, PG_SIG_DFL, PG_SIG_IGN, PGC_S_OVERRIDE, PGC_SUSET, PointerGetDatum, PostmasterContext, pqsignal, PrimaryConnInfo, proc_exit(), procsignal_sigusr1_handler(), SetConfigOption(), SetProcessingMode, SIGCHLD, SIGHUP, SignalHandlerForConfigReload(), SIGPIPE, SIGUSR1, SIGUSR2, slotsync_reread_config(), slotsync_worker_disconnect(), slotsync_worker_onexit(), SlotSyncCtx, StartTransactionCommand(), StatementCancelHandler(), synchronize_slots(), UnBlockSig, validate_remote_info(), wait_for_slot_activity(), walrcv_connect, and wrconn.

◆ ShutDownSlotSync()

void ShutDownSlotSync ( void  )
extern

Definition at line 1818 of file slotsync.c.

1819{
1821
1823
1824 SlotSyncCtx->stopSignaled = true;
1825
1826 /*
1827 * Return if neither the slot sync worker is running nor the function
1828 * pg_sync_replication_slots() is executing.
1829 */
1830 if (!SlotSyncCtx->syncing)
1831 {
1834 return;
1835 }
1836
1838
1840
1841 /*
1842 * Signal process doing slotsync, if any, asking it to stop.
1843 */
1847
1848 /* Wait for slot sync to end */
1849 for (;;)
1850 {
1851 int rc;
1852
1853 /* Wait a bit, we don't expect to have to wait long */
1854 rc = WaitLatch(MyLatch,
1857
1858 if (rc & WL_LATCH_SET)
1859 {
1862 }
1863
1865
1866 /* Ensure that no process is syncing the slots. */
1867 if (!SlotSyncCtx->syncing)
1868 break;
1869
1871 }
1872
1874
1876}
struct Latch * MyLatch
Definition globals.c:65
void ResetLatch(Latch *latch)
Definition latch.c:374
int WaitLatch(Latch *latch, int wakeEvents, long timeout, uint32 wait_event_info)
Definition latch.c:172
#define InvalidPid
Definition miscadmin.h:32
#define INVALID_PROC_NUMBER
Definition procnumber.h:26
int SendProcSignal(pid_t pid, ProcSignalReason reason, ProcNumber procNumber)
Definition procsignal.c:296
@ PROCSIG_SLOTSYNC_MESSAGE
Definition procsignal.h:39
static void update_synced_slots_inactive_since(void)
Definition slotsync.c:1766
static void SpinLockRelease(volatile slock_t *lock)
Definition spin.h:62
static void SpinLockAcquire(volatile slock_t *lock)
Definition spin.h:56
#define WL_TIMEOUT
#define WL_EXIT_ON_PM_DEATH
#define WL_LATCH_SET

References CHECK_FOR_INTERRUPTS, fb(), INVALID_PROC_NUMBER, InvalidPid, SlotSyncCtxStruct::mutex, MyLatch, SlotSyncCtxStruct::pid, PROCSIG_SLOTSYNC_MESSAGE, ResetLatch(), SendProcSignal(), SlotSyncCtx, SpinLockAcquire(), SpinLockRelease(), SlotSyncCtxStruct::stopSignaled, SlotSyncCtxStruct::syncing, update_synced_slots_inactive_since(), WaitLatch(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, and WL_TIMEOUT.

Referenced by FinishWalRecovery().

◆ SlotSyncWorkerCanRestart()

bool SlotSyncWorkerCanRestart ( void  )
extern

Definition at line 1891 of file slotsync.c.

1892{
1893 time_t curtime = time(NULL);
1894
1895 /*
1896 * If first time through, or time somehow went backwards, always update
1897 * last_start_time to match the current clock and allow worker start.
1898 * Otherwise allow it only once enough time has elapsed.
1899 */
1900 if (SlotSyncCtx->last_start_time == 0 ||
1901 curtime < SlotSyncCtx->last_start_time ||
1903 {
1905 return true;
1906 }
1907 return false;
1908}
#define SLOTSYNC_RESTART_INTERVAL_SEC
Definition slotsync.c:145
time_t last_start_time
Definition slotsync.c:117

References fb(), SlotSyncCtxStruct::last_start_time, SLOTSYNC_RESTART_INTERVAL_SEC, and SlotSyncCtx.

Referenced by LaunchMissingBackgroundProcesses().

◆ SyncReplicationSlots()

void SyncReplicationSlots ( WalReceiverConn wrconn)
extern

Definition at line 2010 of file slotsync.c.

2011{
2013 {
2015 List *slot_names = NIL; /* List of slot names to track */
2017
2019
2021
2022 /*
2023 * Setup and use a per-sync-cycle memory context, which is reset every
2024 * time we loop below. This avoids having to retail freeing the memory
2025 * used in each sync cycle.
2026 */
2028 "slot sync retry context",
2030
2031 /* Retry until all the slots are sync-ready */
2032 for (;;)
2033 {
2034 bool slot_persistence_pending = false;
2035 bool some_slot_updated = false;
2037
2038 /* Check for interrupts and config changes */
2040
2043
2044 /* We must be in a valid transaction state */
2046
2049
2050 /*
2051 * Fetch remote slot info for the given slot_names. If slot_names
2052 * is NIL, fetch all failover-enabled slots. Note that we reuse
2053 * slot_names from the first iteration; re-fetching all failover
2054 * slots each time could cause an endless loop. Instead of
2055 * reprocessing only the pending slots in each iteration, it's
2056 * better to process all the slots received in the first
2057 * iteration. This ensures that by the time we're done, all slots
2058 * reflect the latest values.
2059 */
2060 remote_slots = fetch_remote_slots(wrconn, slot_names);
2061
2062 /* Attempt to synchronize slots */
2065
2066 /*
2067 * slot_names must survive later sync_retry_ctx resets, so copy it
2068 * in the outer context.
2069 */
2071
2072 /*
2073 * If slot_persistence_pending is true, extract slot names for
2074 * future iterations (only needed if we haven't done it yet)
2075 */
2076 if (slot_names == NIL && slot_persistence_pending)
2077 slot_names = extract_slot_names(remote_slots);
2078
2079 /* Done if all slots are persisted i.e are sync-ready */
2081 break;
2082
2083 /* wait before retrying again */
2085 }
2086
2088
2089 if (slot_names)
2090 list_free_deep(slot_names);
2091
2092 /* Cleanup the synced temporary slots */
2094
2095 /* We are done with sync, so reset sync flag */
2097 }
2099}
#define PG_ENSURE_ERROR_CLEANUP(cleanup_function, arg)
Definition ipc.h:47
#define PG_END_ENSURE_ERROR_CLEANUP(cleanup_function, arg)
Definition ipc.h:52
void MemoryContextReset(MemoryContext context)
Definition mcxt.c:406
MemoryContext CurrentMemoryContext
Definition mcxt.c:161
#define AllocSetContextCreate
Definition memutils.h:129
#define ALLOCSET_DEFAULT_SIZES
Definition memutils.h:160
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition palloc.h:138
void ReplicationSlotCleanup(bool synced_only)
Definition slot.c:861
static void slotsync_failure_callback(int code, Datum arg)
Definition slotsync.c:1948
static List * extract_slot_names(List *remote_slots)
Definition slotsync.c:1984
static void reset_syncing_flag(void)
Definition slotsync.c:1539

References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, check_and_set_sync_info(), CHECK_FOR_INTERRUPTS, ConfigReloadPending, CurrentMemoryContext, extract_slot_names(), fb(), fetch_remote_slots(), IsTransactionState(), list_free_deep(), MemoryContextDelete(), MemoryContextReset(), MemoryContextSwitchTo(), MyProcPid, NIL, PG_END_ENSURE_ERROR_CLEANUP, PG_ENSURE_ERROR_CLEANUP, PointerGetDatum, ReplicationSlotCleanup(), reset_syncing_flag(), slotsync_failure_callback(), slotsync_reread_config(), synchronize_slots(), validate_remote_info(), wait_for_slot_activity(), and wrconn.

Referenced by pg_sync_replication_slots().

◆ ValidateSlotSyncParams()

bool ValidateSlotSyncParams ( int  elevel)
extern

Definition at line 1185 of file slotsync.c.

1186{
1187 /*
1188 * Logical slot sync/creation requires logical decoding to be enabled.
1189 */
1191 {
1192 ereport(elevel,
1194 errmsg("replication slot synchronization requires \"effective_wal_level\" >= \"logical\" on the primary"),
1195 errhint("To enable logical decoding on primary, set \"wal_level\" >= \"logical\" or create at least one logical slot when \"wal_level\" = \"replica\"."));
1196
1197 return false;
1198 }
1199
1200 /*
1201 * A physical replication slot(primary_slot_name) is required on the
1202 * primary to ensure that the rows needed by the standby are not removed
1203 * after restarting, so that the synchronized slot on the standby will not
1204 * be invalidated.
1205 */
1206 if (PrimarySlotName == NULL || *PrimarySlotName == '\0')
1207 {
1208 ereport(elevel,
1210 /* translator: %s is a GUC variable name */
1211 errmsg("replication slot synchronization requires \"%s\" to be set", "primary_slot_name"));
1212 return false;
1213 }
1214
1215 /*
1216 * hot_standby_feedback must be enabled to cooperate with the physical
1217 * replication slot, which allows informing the primary about the xmin and
1218 * catalog_xmin values on the standby.
1219 */
1221 {
1222 ereport(elevel,
1224 /* translator: %s is a GUC variable name */
1225 errmsg("replication slot synchronization requires \"%s\" to be enabled",
1226 "hot_standby_feedback"));
1227 return false;
1228 }
1229
1230 /*
1231 * The primary_conninfo is required to make connection to primary for
1232 * getting slots information.
1233 */
1234 if (PrimaryConnInfo == NULL || *PrimaryConnInfo == '\0')
1235 {
1236 ereport(elevel,
1238 /* translator: %s is a GUC variable name */
1239 errmsg("replication slot synchronization requires \"%s\" to be set",
1240 "primary_conninfo"));
1241 return false;
1242 }
1243
1244 return true;
1245}
int errhint(const char *fmt,...) pg_attribute_printf(1
bool IsLogicalDecodingEnabled(void)
Definition logicalctl.c:202
bool hot_standby_feedback
Definition walreceiver.c:92
char * PrimarySlotName

References ereport, errcode(), errhint(), errmsg, fb(), hot_standby_feedback, IsLogicalDecodingEnabled(), PrimaryConnInfo, and PrimarySlotName.

Referenced by LaunchMissingBackgroundProcesses(), and pg_sync_replication_slots().

Variable Documentation

◆ PrimaryConnInfo

◆ PrimarySlotName

◆ SlotSyncShutdownPending

PGDLLIMPORT volatile sig_atomic_t SlotSyncShutdownPending
extern

◆ sync_replication_slots

PGDLLIMPORT bool sync_replication_slots
extern