PostgreSQL Source Code
git master
|
#include "replication/walreceiver.h"
Go to the source code of this file.
Functions | |
char * | CheckAndGetDbnameFromConninfo (void) |
bool | ValidateSlotSyncParams (int elevel) |
void | ReplSlotSyncWorkerMain (char *startup_data, size_t startup_data_len) pg_attribute_noreturn() |
void | ShutDownSlotSync (void) |
bool | SlotSyncWorkerCanRestart (void) |
bool | IsSyncingReplicationSlots (void) |
Size | SlotSyncShmemSize (void) |
void | SlotSyncShmemInit (void) |
void | SyncReplicationSlots (WalReceiverConn *wrconn) |
Variables | |
PGDLLIMPORT bool | sync_replication_slots |
PGDLLIMPORT char * | PrimaryConnInfo |
PGDLLIMPORT char * | PrimarySlotName |
char* CheckAndGetDbnameFromConninfo | ( | void | ) |
Definition at line 1012 of file slotsync.c.
References dbname, ereport, errcode(), errmsg(), ERROR, PrimaryConnInfo, and walrcv_get_dbname_from_conninfo.
Referenced by pg_sync_replication_slots(), and ReplSlotSyncWorkerMain().
bool IsSyncingReplicationSlots | ( | void | ) |
Definition at line 1651 of file slotsync.c.
References syncing_slots.
Referenced by CreateDecodingContext(), GetStandbyFlushRecPtr(), and ReplicationSlotCreate().
void ReplSlotSyncWorkerMain | ( | char * | startup_data, |
size_t | startup_data_len | ||
) |
Definition at line 1331 of file slotsync.c.
References appendStringInfo(), appendStringInfoString(), Assert, B_SLOTSYNC_WORKER, BaseInit(), before_shmem_exit(), check_and_set_sync_info(), CheckAndGetDbnameFromConninfo(), cluster_name, StringInfoData::data, dbname, die, EmitErrorReport(), ereport, err(), errcode(), errmsg(), ERROR, error_context_stack, FloatExceptionHandler(), GetProcessingMode, HOLD_INTERRUPTS, init_ps_display(), InitializeTimeouts(), InitPostgres(), InitProcess(), InitProcessing, initStringInfo(), InvalidOid, load_file(), LOG, MyBackendType, MyProcPid, NormalProcessing, pfree(), PG_exception_stack, PGC_S_OVERRIDE, PGC_SUSET, PointerGetDatum(), pqsignal(), PrimaryConnInfo, proc_exit(), ProcessSlotSyncInterrupts(), procsignal_sigusr1_handler(), SetConfigOption(), SetProcessingMode, SIG_DFL, SIG_IGN, SIGCHLD, SIGHUP, SignalHandlerForConfigReload(), SignalHandlerForShutdownRequest(), SIGPIPE, SIGUSR1, SIGUSR2, slotsync_worker_disconnect(), slotsync_worker_onexit(), SlotSyncCtx, synchronize_slots(), UnBlockSig, validate_remote_info(), wait_for_slot_activity(), walrcv_connect, and wrconn.
void ShutDownSlotSync | ( | void | ) |
Definition at line 1563 of file slotsync.c.
References CHECK_FOR_INTERRUPTS, InvalidPid, kill, SlotSyncCtxStruct::mutex, MyLatch, SlotSyncCtxStruct::pid, ResetLatch(), 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().
void SlotSyncShmemInit | ( | void | ) |
Definition at line 1669 of file slotsync.c.
References InvalidPid, SlotSyncCtxStruct::mutex, SlotSyncCtxStruct::pid, ShmemInitStruct(), size, SlotSyncCtx, SlotSyncShmemSize(), and SpinLockInit.
Referenced by CreateOrAttachShmemStructs().
Size SlotSyncShmemSize | ( | void | ) |
Definition at line 1660 of file slotsync.c.
Referenced by CalculateShmemSize(), and SlotSyncShmemInit().
bool SlotSyncWorkerCanRestart | ( | void | ) |
Definition at line 1631 of file slotsync.c.
References SlotSyncCtxStruct::last_start_time, SLOTSYNC_RESTART_INTERVAL_SEC, and SlotSyncCtx.
Referenced by LaunchMissingBackgroundProcesses().
void SyncReplicationSlots | ( | WalReceiverConn * | wrconn | ) |
Definition at line 1726 of file slotsync.c.
References check_and_set_sync_info(), InvalidPid, PG_END_ENSURE_ERROR_CLEANUP, PG_ENSURE_ERROR_CLEANUP, PointerGetDatum(), ReplicationSlotCleanup(), reset_syncing_flag(), slotsync_failure_callback(), synchronize_slots(), validate_remote_info(), and wrconn.
Referenced by pg_sync_replication_slots().
bool ValidateSlotSyncParams | ( | int | elevel | ) |
Definition at line 1039 of file slotsync.c.
References ereport, errcode(), errmsg(), ERROR, hot_standby_feedback, PrimaryConnInfo, PrimarySlotName, wal_level, and WAL_LEVEL_LOGICAL.
Referenced by LaunchMissingBackgroundProcesses(), and pg_sync_replication_slots().
|
extern |
Definition at line 97 of file xlogrecovery.c.
Referenced by CheckAndGetDbnameFromConninfo(), pg_sync_replication_slots(), ReplSlotSyncWorkerMain(), slotsync_reread_config(), StartupRereadConfig(), validateRecoveryParameters(), ValidateSlotSyncParams(), and WaitForWALToBecomeAvailable().
|
extern |
Definition at line 98 of file xlogrecovery.c.
Referenced by slotsync_reread_config(), StartupRereadConfig(), validate_remote_info(), ValidateSlotSyncParams(), and WaitForWALToBecomeAvailable().
|
extern |
Definition at line 109 of file slotsync.c.
Referenced by LaunchMissingBackgroundProcesses(), and slotsync_reread_config().