|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/xloginsert.h"#include "catalog/pg_control.h"#include "miscadmin.h"#include "replication/slot.h"#include "storage/ipc.h"#include "storage/lmgr.h"#include "storage/proc.h"#include "storage/procarray.h"#include "utils/injection_point.h"
Go to the source code of this file.
Data Structures | |
| struct | LogicalDecodingCtlData |
Typedefs | |
| typedef struct LogicalDecodingCtlData | LogicalDecodingCtlData |
Variables | |
| static LogicalDecodingCtlData * | LogicalDecodingCtl = NULL |
| bool | XLogLogicalInfo = false |
| static bool | XLogLogicalInfoUpdatePending = false |
Definition at line 265 of file logicalctl.c.
References Assert, DEBUG1, elog, EmitProcSignalBarrier(), fb(), LogicalDecodingCtlData::logical_decoding_enabled, LogicalDecodingCtl, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MyReplicationSlot, PROCSIGNAL_BARRIER_UPDATE_XLOG_LOGICAL_INFO, and LogicalDecodingCtlData::xlog_logical_info.
Referenced by EnsureLogicalDecodingEnabled().
Definition at line 235 of file logicalctl.c.
References update_xlog_logical_info(), and XLogLogicalInfoUpdatePending.
Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().
Definition at line 491 of file logicalctl.c.
References CheckLogicalSlotExists(), EmitProcSignalBarrier(), END_CRIT_SECTION, ereport, errmsg(), fb(), LOG, LogicalDecodingCtlData::logical_decoding_enabled, LogicalDecodingCtl, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), LogicalDecodingCtlData::pending_disable, PROCSIGNAL_BARRIER_UPDATE_XLOG_LOGICAL_INFO, RecoveryInProgress(), START_CRIT_SECTION, write_logical_decoding_status_update_record(), and LogicalDecodingCtlData::xlog_logical_info.
Referenced by DisableLogicalDecodingIfNecessary(), and xlog_redo().
Definition at line 460 of file logicalctl.c.
References Assert, DisableLogicalDecoding(), fb(), LogicalDecodingCtl, LW_SHARED, LWLockAcquire(), LWLockRelease(), MyReplicationSlot, LogicalDecodingCtlData::pending_disable, RecoveryInProgress(), wal_level, and WAL_LEVEL_REPLICA.
Referenced by CheckpointerMain().
Definition at line 340 of file logicalctl.c.
References EmitProcSignalBarrier(), END_CRIT_SECTION, ereport, errmsg(), fb(), INJECTION_POINT, LOG, LogicalDecodingCtlData::logical_decoding_enabled, LogicalDecodingCtl, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), LogicalDecodingCtlData::pending_disable, PROCSIGNAL_BARRIER_UPDATE_XLOG_LOGICAL_INFO, RecoveryInProgress(), START_CRIT_SECTION, WaitForProcSignalBarrier(), write_logical_decoding_status_update_record(), and LogicalDecodingCtlData::xlog_logical_info.
Referenced by EnsureLogicalDecodingEnabled(), and xlog_redo().
Definition at line 305 of file logicalctl.c.
References abort_logical_decoding_activation(), Assert, EnableLogicalDecoding(), IsLogicalDecodingEnabled(), MyReplicationSlot, PG_END_ENSURE_ERROR_CLEANUP, PG_ENSURE_ERROR_CLEANUP, RecoveryInProgress(), wal_level, WAL_LEVEL_LOGICAL, and WAL_LEVEL_REPLICA.
Referenced by create_logical_replication_slot(), and CreateReplicationSlot().
Definition at line 176 of file logicalctl.c.
References update_xlog_logical_info().
Referenced by BaseInit().
Definition at line 204 of file logicalctl.c.
References fb(), LogicalDecodingCtlData::logical_decoding_enabled, LogicalDecodingCtl, LW_SHARED, LWLockAcquire(), and LWLockRelease().
Referenced by CheckLogicalDecodingRequirements(), create_logical_replication_slot(), CreateCheckPoint(), CreateReplicationSlot(), EnsureLogicalDecodingEnabled(), LogStandbySnapshot(), ResolveRecoveryConflictWithSnapshot(), UpdateLogicalDecodingStatusEndOfRecovery(), and ValidateSlotSyncParams().
Definition at line 220 of file logicalctl.c.
References fb(), LogicalDecodingCtl, LW_SHARED, LWLockAcquire(), LWLockRelease(), and LogicalDecodingCtlData::xlog_logical_info.
Referenced by show_effective_wal_level(), update_xlog_logical_info(), and UpdateLogicalDecodingStatusEndOfRecovery().
Definition at line 129 of file logicalctl.c.
References LogicalDecodingCtl, LogicalDecodingCtlShmemSize(), MemSet, and ShmemInitStruct().
Referenced by CreateOrAttachShmemStructs().
Definition at line 123 of file logicalctl.c.
Referenced by CalculateShmemSize(), and LogicalDecodingCtlShmemInit().
Definition at line 186 of file logicalctl.c.
References GetTopTransactionIdIfAny(), InvalidTransactionId, update_xlog_logical_info(), and XLogLogicalInfoUpdatePending.
Referenced by ProcessProcSignalBarrier().
Definition at line 433 of file logicalctl.c.
References DEBUG1, elog, fb(), LogicalDecodingCtl, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), LogicalDecodingCtlData::pending_disable, WakeupCheckpointer(), wal_level, and WAL_LEVEL_REPLICA.
Referenced by InvalidateObsoleteReplicationSlots(), ReplicationSlotCleanup(), ReplicationSlotDrop(), ReplicationSlotRelease(), and ReplicationSlotsDropDBSlots().
Definition at line 146 of file logicalctl.c.
References fb(), LogicalDecodingCtlData::logical_decoding_enabled, LogicalDecodingCtl, wal_level, WAL_LEVEL_MINIMAL, and LogicalDecodingCtlData::xlog_logical_info.
Referenced by StartupXLOG().
Definition at line 166 of file logicalctl.c.
References IsXLogLogicalInfoEnabled(), and XLogLogicalInfo.
Referenced by AtEOXact_LogicalCtl(), InitializeProcessXLogLogicalInfo(), and ProcessBarrierUpdateXLogLogicalInfo().
Definition at line 553 of file logicalctl.c.
References Assert, CheckLogicalSlotExists(), DEBUG1, elog, EmitProcSignalBarrier(), fb(), INJECTION_POINT, IsLogicalDecodingEnabled(), IsUnderPostmaster, IsXLogLogicalInfoEnabled(), LogicalDecodingCtlData::logical_decoding_enabled, LogicalDecodingCtl, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), LogicalDecodingCtlData::pending_disable, PROCSIGNAL_BARRIER_UPDATE_XLOG_LOGICAL_INFO, RecoveryInProgress(), WaitForProcSignalBarrier(), wal_level, WAL_LEVEL_LOGICAL, WAL_LEVEL_MINIMAL, write_logical_decoding_status_update_record(), and LogicalDecodingCtlData::xlog_logical_info.
Referenced by StartupXLOG().
Definition at line 250 of file logicalctl.c.
References fb(), XLOG_LOGICAL_DECODING_STATUS_CHANGE, XLogBeginInsert(), XLogFlush(), XLogInsert(), and XLogRegisterData().
Referenced by DisableLogicalDecoding(), EnableLogicalDecoding(), and UpdateLogicalDecodingStatusEndOfRecovery().
|
static |
Definition at line 98 of file logicalctl.c.
Referenced by abort_logical_decoding_activation(), DisableLogicalDecoding(), DisableLogicalDecodingIfNecessary(), EnableLogicalDecoding(), IsLogicalDecodingEnabled(), IsXLogLogicalInfoEnabled(), LogicalDecodingCtlShmemInit(), RequestDisableLogicalDecoding(), StartupLogicalDecodingStatus(), and UpdateLogicalDecodingStatusEndOfRecovery().
Definition at line 107 of file logicalctl.c.
Referenced by update_xlog_logical_info().
Definition at line 116 of file logicalctl.c.
Referenced by AtEOXact_LogicalCtl(), and ProcessBarrierUpdateXLogLogicalInfo().