|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/heapam.h"#include "access/htup.h"#include "access/htup_details.h"#include "access/tableam.h"#include "access/xact.h"#include "catalog/pg_subscription.h"#include "catalog/pg_subscription_rel.h"#include "funcapi.h"#include "lib/dshash.h"#include "miscadmin.h"#include "pgstat.h"#include "postmaster/bgworker.h"#include "postmaster/interrupt.h"#include "replication/logicallauncher.h"#include "replication/origin.h"#include "replication/slot.h"#include "replication/walreceiver.h"#include "replication/worker_internal.h"#include "storage/ipc.h"#include "storage/proc.h"#include "storage/procarray.h"#include "tcop/tcopprot.h"#include "utils/builtins.h"#include "utils/memutils.h"#include "utils/pg_lsn.h"#include "utils/snapmgr.h"#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
| struct | LogicalRepCtxStruct |
| struct | LauncherLastStartTimesEntry |
Macros | |
| #define | DEFAULT_NAPTIME_PER_CYCLE 180000L |
| #define | PG_STAT_GET_SUBSCRIPTION_COLS 10 |
Typedefs | |
| typedef struct LogicalRepCtxStruct | LogicalRepCtxStruct |
| typedef struct LauncherLastStartTimesEntry | LauncherLastStartTimesEntry |
Variables | |
| int | max_logical_replication_workers = 4 |
| int | max_sync_workers_per_subscription = 2 |
| int | max_parallel_apply_workers_per_subscription = 2 |
| LogicalRepWorker * | MyLogicalRepWorker = NULL |
| static LogicalRepCtxStruct * | LogicalRepCtx |
| static const dshash_parameters | dsh_params |
| static dsa_area * | last_start_times_dsa = NULL |
| static dshash_table * | last_start_times = NULL |
| static bool | on_commit_launcher_wakeup = false |
| #define DEFAULT_NAPTIME_PER_CYCLE 180000L |
Definition at line 49 of file launcher.c.
| #define PG_STAT_GET_SUBSCRIPTION_COLS 10 |
| typedef struct LauncherLastStartTimesEntry LauncherLastStartTimesEntry |
| typedef struct LogicalRepCtxStruct LogicalRepCtxStruct |
|
static |
Definition at line 1445 of file launcher.c.
References CONFLICT_DETECTION_SLOT, ReplicationSlotAcquire(), and SearchNamedReplicationSlot().
Referenced by ApplyLauncherMain().
| void ApplyLauncherForgetWorkerStartTime | ( | Oid | subid | ) |
Definition at line 1114 of file launcher.c.
References dshash_delete_key(), last_start_times, and logicalrep_launcher_attach_dshmem().
Referenced by apply_worker_exit(), DisableSubscriptionAndExit(), DropSubscription(), InitializeLogRepWorker(), maybe_reread_subscription(), and ProcessSyncingTablesForApply().
|
static |
Definition at line 1088 of file launcher.c.
References dshash_find(), dshash_release_lock(), LauncherLastStartTimesEntry::last_start_time, last_start_times, and logicalrep_launcher_attach_dshmem().
Referenced by ApplyLauncherMain().
| void ApplyLauncherMain | ( | Datum | main_arg | ) |
Definition at line 1164 of file launcher.c.
References acquire_conflict_slot_if_exists(), ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, ApplyLauncherGetWorkerStartTime(), ApplyLauncherSetWorkerStartTime(), Assert(), BackgroundWorkerInitializeConnection(), BackgroundWorkerUnblockSignals(), before_shmem_exit(), CHECK_FOR_INTERRUPTS, compute_min_nonremovable_xid(), ConfigReloadPending, CreateConflictDetectionSlot(), ReplicationSlot::data, Subscription::dbid, DEBUG1, DEFAULT_NAPTIME_PER_CYCLE, die, DSM_HANDLE_INVALID, Subscription::enabled, ereport, errmsg_internal(), get_subscription_list(), GetCurrentTimestamp(), init_conflict_slot_xmin(), InvalidOid, InvalidTransactionId, LogicalRepCtxStruct::launcher_pid, lfirst, logicalrep_launcher_onexit(), logicalrep_worker_find(), logicalrep_worker_launch(), LogicalRepCtx, LW_SHARED, LWLockAcquire(), LWLockRelease(), MemoryContextDelete(), MemoryContextSwitchTo(), Min, MyLatch, MyProcPid, MyReplicationSlot, Subscription::name, now(), Subscription::oid, Subscription::owner, PGC_SIGHUP, pqsignal, ProcessConfigFile(), ReplicationSlotDropAcquired(), ResetLatch(), Subscription::retaindeadtuples, Subscription::retentionactive, SIGHUP, SignalHandlerForConfigReload(), TimestampDifferenceMilliseconds(), TopMemoryContext, TransactionIdIsValid, update_conflict_slot_xmin(), WaitLatch(), wal_retrieve_retry_interval, WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, WL_TIMEOUT, WORKERTYPE_APPLY, and ReplicationSlotPersistentData::xmin.
| void ApplyLauncherRegister | ( | void | ) |
Definition at line 957 of file launcher.c.
References BackgroundWorker::bgw_flags, BackgroundWorker::bgw_function_name, BackgroundWorker::bgw_library_name, BackgroundWorker::bgw_main_arg, BGW_MAXLEN, BackgroundWorker::bgw_name, BackgroundWorker::bgw_notify_pid, BackgroundWorker::bgw_restart_time, BackgroundWorker::bgw_start_time, BackgroundWorker::bgw_type, BGWORKER_BACKEND_DATABASE_CONNECTION, BGWORKER_SHMEM_ACCESS, BgWorkerStart_RecoveryFinished, IsBinaryUpgrade, max_logical_replication_workers, MAXPGPATH, RegisterBackgroundWorker(), and snprintf.
Referenced by PostmasterMain().
|
static |
Definition at line 1072 of file launcher.c.
References dshash_find_or_insert(), dshash_release_lock(), LauncherLastStartTimesEntry::last_start_time, last_start_times, logicalrep_launcher_attach_dshmem(), and start_time.
Referenced by ApplyLauncherMain().
| void ApplyLauncherShmemInit | ( | void | ) |
Definition at line 993 of file launcher.c.
References ApplyLauncherShmemSize(), DSA_HANDLE_INVALID, DSHASH_HANDLE_INVALID, LogicalRepCtxStruct::last_start_dsa, LogicalRepCtxStruct::last_start_dsh, LogicalRepCtx, max_logical_replication_workers, LogicalRepWorker::relmutex, ShmemInitStruct(), SpinLockInit, and LogicalRepCtxStruct::workers.
Referenced by CreateOrAttachShmemStructs().
| Size ApplyLauncherShmemSize | ( | void | ) |
Definition at line 938 of file launcher.c.
References add_size(), max_logical_replication_workers, MAXALIGN, and mul_size().
Referenced by ApplyLauncherShmemInit(), and CalculateShmemSize().
| void ApplyLauncherWakeup | ( | void | ) |
Definition at line 1154 of file launcher.c.
References kill, LogicalRepCtxStruct::launcher_pid, LogicalRepCtx, and SIGUSR1.
Referenced by AtEOXact_ApplyLauncher(), logicalrep_worker_onexit(), update_retention_status(), and wait_for_local_flush().
| void ApplyLauncherWakeupAtCommit | ( | void | ) |
Definition at line 1144 of file launcher.c.
References on_commit_launcher_wakeup.
Referenced by AlterSubscription(), AlterSubscriptionOwner_internal(), and CreateSubscription().
| void AtEOXact_ApplyLauncher | ( | bool | isCommit | ) |
Definition at line 1125 of file launcher.c.
References ApplyLauncherWakeup(), and on_commit_launcher_wakeup.
Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().
|
static |
Definition at line 1407 of file launcher.c.
References Assert(), MyReplicationSlot, LogicalRepWorker::oldest_nonremovable_xid, LogicalRepWorker::relmutex, SpinLockAcquire, SpinLockRelease, TransactionIdIsValid, and TransactionIdPrecedes().
Referenced by ApplyLauncherMain().
| void CreateConflictDetectionSlot | ( | void | ) |
Definition at line 1526 of file launcher.c.
References CONFLICT_DETECTION_SLOT, ereport, errmsg(), init_conflict_slot_xmin(), LOG, MyReplicationSlot, ReplicationSlotCreate(), and RS_PERSISTENT.
Referenced by ApplyLauncherMain(), and binary_upgrade_create_conflict_detection_slot().
|
static |
Definition at line 117 of file launcher.c.
References AccessShareLock, CommitTransactionCommand(), CurrentMemoryContext, Subscription::dbid, Subscription::enabled, ForwardScanDirection, GETSTRUCT(), heap_getnext(), HeapTupleIsValid, lappend(), MemoryContextSwitchTo(), Subscription::name, NameStr, NIL, Subscription::oid, Subscription::owner, palloc0(), pstrdup(), Subscription::retaindeadtuples, Subscription::retentionactive, StartTransactionCommand(), table_beginscan_catalog(), table_close(), table_endscan(), and table_open().
Referenced by ApplyLauncherMain().
| pid_t GetLeaderApplyWorkerPid | ( | pid_t | pid | ) |
Definition at line 1555 of file launcher.c.
References i, InvalidPid, isParallelApplyWorker, LogicalRepWorker::leader_pid, LogicalRepCtx, LW_SHARED, LWLockAcquire(), LWLockRelease(), max_logical_replication_workers, PGPROC::pid, LogicalRepWorker::proc, and LogicalRepCtxStruct::workers.
Referenced by pg_stat_get_activity().
|
static |
Definition at line 1495 of file launcher.c.
References Assert(), ReplicationSlot::data, ReplicationSlot::effective_xmin, GetOldestSafeDecodingTransactionId(), LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), ReplicationSlot::mutex, MyReplicationSlot, ReplicationSlotMarkDirty(), ReplicationSlotSave(), ReplicationSlotsComputeRequiredXmin(), SpinLockAcquire, SpinLockRelease, TransactionIdIsValid, and ReplicationSlotPersistentData::xmin.
Referenced by ApplyLauncherMain(), and CreateConflictDetectionSlot().
| bool IsLogicalLauncher | ( | void | ) |
Definition at line 1545 of file launcher.c.
References LogicalRepCtxStruct::launcher_pid, LogicalRepCtx, and MyProcPid.
Referenced by ProcessInterrupts(), ReplicationSlotAcquire(), and ReplicationSlotCreate().
|
static |
Definition at line 1028 of file launcher.c.
References dsa_attach(), dsa_create, dsa_get_handle(), dsa_pin(), dsa_pin_mapping(), dsh_params, dshash_attach(), dshash_create(), dshash_get_hash_table_handle(), DSHASH_HANDLE_INVALID, LogicalRepCtxStruct::last_start_dsa, LogicalRepCtxStruct::last_start_dsh, last_start_times, last_start_times_dsa, LogicalRepCtx, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MemoryContextSwitchTo(), and TopMemoryContext.
Referenced by ApplyLauncherForgetWorkerStartTime(), ApplyLauncherGetWorkerStartTime(), and ApplyLauncherSetWorkerStartTime().
|
static |
Definition at line 846 of file launcher.c.
References LogicalRepCtxStruct::launcher_pid, and LogicalRepCtx.
Referenced by ApplyLauncherMain().
|
static |
Definition at line 911 of file launcher.c.
References Assert(), i, isParallelApplyWorker, LogicalRepCtx, LWLockHeldByMe(), max_logical_replication_workers, LogicalRepWorker::subid, and LogicalRepCtxStruct::workers.
Referenced by logicalrep_worker_launch().
| void logicalrep_pa_worker_stop | ( | ParallelApplyWorkerInfo * | winfo | ) |
Definition at line 666 of file launcher.c.
References Assert(), ParallelApplyWorkerInfo::error_mq_handle, LogicalRepWorker::generation, isParallelApplyWorker, ParallelApplyWorkerShared::logicalrep_worker_generation, ParallelApplyWorkerShared::logicalrep_worker_slot_no, logicalrep_worker_stop_internal(), LogicalRepCtx, LW_SHARED, LWLockAcquire(), LWLockRelease(), max_logical_replication_workers, ParallelApplyWorkerShared::mutex, LogicalRepWorker::proc, ParallelApplyWorkerInfo::shared, shm_mq_detach(), SIGUSR2, SpinLockAcquire, SpinLockRelease, and LogicalRepCtxStruct::workers.
Referenced by pa_free_worker().
| int logicalrep_sync_worker_count | ( | Oid | subid | ) |
Definition at line 887 of file launcher.c.
References Assert(), i, isTablesyncWorker, LogicalRepCtx, LWLockHeldByMe(), max_logical_replication_workers, LogicalRepWorker::subid, and LogicalRepCtxStruct::workers.
Referenced by logicalrep_worker_launch(), and ProcessSyncingTablesForApply().
| void logicalrep_worker_attach | ( | int | slot | ) |
Definition at line 744 of file launcher.c.
References Assert(), before_shmem_exit(), ereport, errcode(), errmsg(), ERROR, LogicalRepWorker::in_use, logicalrep_worker_onexit(), LogicalRepCtx, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), max_logical_replication_workers, MyLogicalRepWorker, MyProc, LogicalRepWorker::proc, and LogicalRepCtxStruct::workers.
Referenced by ParallelApplyWorkerMain(), and SetupApplyOrSyncWorker().
|
static |
Definition at line 825 of file launcher.c.
References Assert(), LogicalRepWorker::dbid, LogicalRepWorker::in_use, InvalidOid, InvalidPid, LogicalRepWorker::leader_pid, LW_EXCLUSIVE, LWLockHeldByMeInMode(), LogicalRepWorker::parallel_apply, LogicalRepWorker::proc, LogicalRepWorker::relid, LogicalRepWorker::subid, LogicalRepWorker::type, LogicalRepWorker::userid, and WORKERTYPE_UNKNOWN.
Referenced by logicalrep_worker_detach(), logicalrep_worker_launch(), and WaitForReplicationWorkerAttach().
|
static |
Definition at line 781 of file launcher.c.
References am_leader_apply_worker(), isParallelApplyWorker, lfirst, list_free(), logicalrep_worker_cleanup(), logicalrep_worker_stop_internal(), logicalrep_workers_find(), LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), MyLogicalRepWorker, pa_detach_all_error_mq(), and LogicalRepWorker::subid.
Referenced by logicalrep_worker_onexit().
| LogicalRepWorker * logicalrep_worker_find | ( | LogicalRepWorkerType | wtype, |
| Oid | subid, | ||
| Oid | relid, | ||
| bool | only_running | ||
| ) |
Definition at line 256 of file launcher.c.
References Assert(), i, LogicalRepWorker::in_use, isParallelApplyWorker, LogicalRepCtx, LWLockHeldByMe(), max_logical_replication_workers, OidIsValid, LogicalRepWorker::proc, LogicalRepWorker::relid, LogicalRepWorker::subid, LogicalRepWorker::type, LogicalRepCtxStruct::workers, and WORKERTYPE_TABLESYNC.
Referenced by ApplyLauncherMain(), FindDeletedTupleInLocalRel(), logicalrep_worker_stop(), logicalrep_worker_wakeup(), ProcessSyncingTablesForApply(), wait_for_table_state_change(), and wait_for_worker_state_change().
| bool logicalrep_worker_launch | ( | LogicalRepWorkerType | wtype, |
| Oid | dbid, | ||
| Oid | subid, | ||
| const char * | subname, | ||
| Oid | userid, | ||
| Oid | relid, | ||
| dsm_handle | subworker_dsm, | ||
| bool | retain_dead_tuples | ||
| ) |
Definition at line 322 of file launcher.c.
References Assert(), BackgroundWorker::bgw_extra, BackgroundWorker::bgw_flags, BackgroundWorker::bgw_function_name, BackgroundWorker::bgw_library_name, BackgroundWorker::bgw_main_arg, BGW_MAXLEN, BackgroundWorker::bgw_name, BGW_NEVER_RESTART, BackgroundWorker::bgw_notify_pid, BackgroundWorker::bgw_restart_time, BackgroundWorker::bgw_start_time, BackgroundWorker::bgw_type, BGWORKER_BACKEND_DATABASE_CONNECTION, BGWORKER_SHMEM_ACCESS, BgWorkerStart_RecoveryFinished, ReplicationSlot::data, LogicalRepWorker::dbid, DEBUG1, DSM_HANDLE_INVALID, elog, ereport, errcode(), errhint(), errmsg(), errmsg_internal(), ERROR, LogicalRepWorker::generation, GetCurrentTimestamp(), i, LogicalRepWorker::in_use, Int32GetDatum(), InvalidPid, InvalidTransactionId, InvalidXLogRecPtr, LogicalRepWorker::last_lsn, LogicalRepWorker::last_recv_time, LogicalRepWorker::last_send_time, LogicalRepWorker::launch_time, LogicalRepWorker::leader_pid, logicalrep_pa_worker_count(), logicalrep_sync_worker_count(), logicalrep_worker_cleanup(), LogicalRepCtx, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), max_active_replication_origins, max_logical_replication_workers, max_parallel_apply_workers_per_subscription, max_sync_workers_per_subscription, MAXPGPATH, MyProcPid, MyReplicationSlot, now(), OidIsValid, LogicalRepWorker::oldest_nonremovable_xid, LogicalRepWorker::parallel_apply, LogicalRepWorker::proc, RegisterDynamicBackgroundWorker(), LogicalRepWorker::relid, LogicalRepWorker::relstate, LogicalRepWorker::relstate_lsn, LogicalRepWorker::reply_lsn, LogicalRepWorker::reply_time, snprintf, LogicalRepWorker::stream_fileset, LogicalRepWorker::subid, subname, TIMESTAMP_NOBEGIN, TimestampDifferenceExceeds(), LogicalRepWorker::type, LogicalRepWorker::userid, WaitForReplicationWorkerAttach(), wal_receiver_timeout, WARNING, LogicalRepCtxStruct::workers, WORKERTYPE_APPLY, WORKERTYPE_PARALLEL_APPLY, WORKERTYPE_TABLESYNC, WORKERTYPE_UNKNOWN, and ReplicationSlotPersistentData::xmin.
Referenced by ApplyLauncherMain(), pa_launch_parallel_worker(), and ProcessSyncingTablesForApply().
|
static |
Definition at line 857 of file launcher.c.
References ApplyLauncherWakeup(), DEFAULT_LOCKMETHOD, FileSetDeleteAll(), InitializingApplyWorker, LockReleaseAll(), logicalrep_worker_detach(), LogRepWorkerWalRcvConn, MyLogicalRepWorker, LogicalRepWorker::stream_fileset, and walrcv_disconnect.
Referenced by logicalrep_worker_attach().
| void logicalrep_worker_stop | ( | LogicalRepWorkerType | wtype, |
| Oid | subid, | ||
| Oid | relid | ||
| ) |
Definition at line 639 of file launcher.c.
References Assert(), isParallelApplyWorker, logicalrep_worker_find(), logicalrep_worker_stop_internal(), LW_SHARED, LWLockAcquire(), LWLockRelease(), OidIsValid, and WORKERTYPE_TABLESYNC.
Referenced by AlterSubscription_refresh(), and DropSubscription().
|
static |
Definition at line 556 of file launcher.c.
References Assert(), CHECK_FOR_INTERRUPTS, LogicalRepWorker::generation, LogicalRepWorker::in_use, kill, LW_SHARED, LWLockAcquire(), LWLockHeldByMeInMode(), LWLockRelease(), MyLatch, PGPROC::pid, LogicalRepWorker::proc, ResetLatch(), WaitLatch(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, and WL_TIMEOUT.
Referenced by logicalrep_pa_worker_stop(), logicalrep_worker_detach(), and logicalrep_worker_stop().
| void logicalrep_worker_wakeup | ( | LogicalRepWorkerType | wtype, |
| Oid | subid, | ||
| Oid | relid | ||
| ) |
Definition at line 710 of file launcher.c.
References Assert(), logicalrep_worker_find(), logicalrep_worker_wakeup_ptr(), LW_SHARED, LWLockAcquire(), LWLockRelease(), OidIsValid, and WORKERTYPE_TABLESYNC.
Referenced by apply_handle_stream_start(), and FinishSyncWorker().
| void logicalrep_worker_wakeup_ptr | ( | LogicalRepWorker * | worker | ) |
Definition at line 733 of file launcher.c.
References Assert(), LWLockHeldByMe(), LogicalRepWorker::proc, PGPROC::procLatch, and SetLatch().
Referenced by AtEOXact_LogicalRepWorkers(), logicalrep_worker_wakeup(), ProcessSyncingTablesForApply(), and wait_for_worker_state_change().
Definition at line 291 of file launcher.c.
References Assert(), i, LogicalRepWorker::in_use, lappend(), LogicalRepCtx, LW_SHARED, LWLockAcquire(), LWLockHeldByMe(), LWLockRelease(), max_logical_replication_workers, NIL, LogicalRepWorker::proc, LogicalRepWorker::subid, and LogicalRepCtxStruct::workers.
Referenced by AlterSubscription(), AtEOXact_LogicalRepWorkers(), DropSubscription(), and logicalrep_worker_detach().
| Datum pg_stat_get_subscription | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1582 of file launcher.c.
References CStringGetTextDatum, elog, ERROR, i, InitMaterializedSRF(), Int32GetDatum(), InvalidOid, IsBackendPid(), isParallelApplyWorker, isTablesyncWorker, LogicalRepWorker::last_lsn, LogicalRepWorker::last_recv_time, LogicalRepWorker::last_send_time, LogicalRepWorker::leader_pid, LogicalRepCtx, LSNGetDatum(), LW_SHARED, LWLockAcquire(), LWLockRelease(), max_logical_replication_workers, ObjectIdGetDatum(), OidIsValid, PG_ARGISNULL, PG_GETARG_OID, PG_STAT_GET_SUBSCRIPTION_COLS, PGPROC::pid, LogicalRepWorker::proc, LogicalRepWorker::relid, LogicalRepWorker::reply_lsn, LogicalRepWorker::reply_time, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, LogicalRepWorker::subid, TimestampTzGetDatum(), tuplestore_putvalues(), LogicalRepWorker::type, values, LogicalRepCtxStruct::workers, WORKERTYPE_APPLY, WORKERTYPE_PARALLEL_APPLY, WORKERTYPE_TABLESYNC, WORKERTYPE_UNKNOWN, and XLogRecPtrIsInvalid.
|
static |
Definition at line 1459 of file launcher.c.
References Assert(), ReplicationSlot::data, DEBUG1, ReplicationSlot::effective_xmin, elog, ReplicationSlot::mutex, MyReplicationSlot, ReplicationSlotMarkDirty(), ReplicationSlotsComputeRequiredXmin(), SpinLockAcquire, SpinLockRelease, TransactionIdEquals, TransactionIdIsValid, TransactionIdPrecedesOrEquals(), and ReplicationSlotPersistentData::xmin.
Referenced by ApplyLauncherMain().
|
static |
Definition at line 181 of file launcher.c.
References BGWH_STOPPED, CHECK_FOR_INTERRUPTS, LogicalRepWorker::generation, GetBackgroundWorkerPid(), LogicalRepWorker::in_use, logicalrep_worker_cleanup(), LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), MyLatch, LogicalRepWorker::proc, ResetLatch(), SetLatch(), WaitLatch(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, and WL_TIMEOUT.
Referenced by logicalrep_worker_launch().
|
static |
Definition at line 81 of file launcher.c.
Referenced by logicalrep_launcher_attach_dshmem().
|
static |
Definition at line 91 of file launcher.c.
Referenced by ApplyLauncherForgetWorkerStartTime(), ApplyLauncherGetWorkerStartTime(), ApplyLauncherSetWorkerStartTime(), logicalrep_launcher_attach_dshmem(), and ProcessSyncingTablesForApply().
|
static |
Definition at line 90 of file launcher.c.
Referenced by logicalrep_launcher_attach_dshmem().
|
static |
Definition at line 71 of file launcher.c.
Referenced by ApplyLauncherMain(), ApplyLauncherShmemInit(), ApplyLauncherWakeup(), GetLeaderApplyWorkerPid(), IsLogicalLauncher(), logicalrep_launcher_attach_dshmem(), logicalrep_launcher_onexit(), logicalrep_pa_worker_count(), logicalrep_pa_worker_stop(), logicalrep_sync_worker_count(), logicalrep_worker_attach(), logicalrep_worker_find(), logicalrep_worker_launch(), logicalrep_workers_find(), and pg_stat_get_subscription().
| int max_logical_replication_workers = 4 |
Definition at line 52 of file launcher.c.
Referenced by ApplyLauncherRegister(), ApplyLauncherShmemInit(), ApplyLauncherShmemSize(), GetLeaderApplyWorkerPid(), logicalrep_pa_worker_count(), logicalrep_pa_worker_stop(), logicalrep_sync_worker_count(), logicalrep_worker_attach(), logicalrep_worker_find(), logicalrep_worker_launch(), logicalrep_workers_find(), and pg_stat_get_subscription().
| int max_parallel_apply_workers_per_subscription = 2 |
Definition at line 54 of file launcher.c.
Referenced by logicalrep_worker_launch(), and pa_free_worker().
| int max_sync_workers_per_subscription = 2 |
Definition at line 53 of file launcher.c.
Referenced by logicalrep_worker_launch(), and ProcessSyncingTablesForApply().
| LogicalRepWorker* MyLogicalRepWorker = NULL |
Definition at line 56 of file launcher.c.
Referenced by am_leader_apply_worker(), am_parallel_apply_worker(), am_tablesync_worker(), apply_handle_stream_abort(), apply_handle_stream_commit(), apply_handle_stream_prepare(), apply_handle_stream_start(), apply_spooled_messages(), apply_worker_exit(), DisableSubscriptionAndExit(), ensure_last_message(), FindDeletedTupleInLocalRel(), FinishSyncWorker(), get_candidate_xid(), InitializeLogRepWorker(), IsLogicalWorker(), logicalrep_worker_attach(), logicalrep_worker_detach(), logicalrep_worker_onexit(), LogicalRepSyncTableStart(), maybe_reread_subscription(), pa_can_start(), pa_free_worker_info(), pa_launch_parallel_worker(), pa_lock_stream(), pa_lock_transaction(), pa_set_fileset_state(), pa_shutdown(), pa_unlock_stream(), pa_unlock_transaction(), ParallelApplyWorkerMain(), ProcessSyncingRelations(), ProcessSyncingTablesForApply(), ProcessSyncingTablesForSync(), run_tablesync_worker(), set_stream_options(), SetupApplyOrSyncWorker(), should_apply_changes_for_rel(), stop_conflict_info_retention(), stream_abort_internal(), stream_cleanup_files(), stream_open_file(), stream_start_internal(), stream_stop_internal(), subxact_info_read(), subxact_info_write(), UpdateWorkerStats(), wait_for_local_flush(), wait_for_table_state_change(), and wait_for_worker_state_change().
|
static |
Definition at line 93 of file launcher.c.
Referenced by ApplyLauncherWakeupAtCommit(), and AtEOXact_ApplyLauncher().