PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
void | ApplyLauncherRegister (void) |
void | ApplyLauncherMain (Datum main_arg) |
Size | ApplyLauncherShmemSize (void) |
void | ApplyLauncherShmemInit (void) |
void | ApplyLauncherForgetWorkerStartTime (Oid subid) |
void | ApplyLauncherWakeupAtCommit (void) |
void | AtEOXact_ApplyLauncher (bool isCommit) |
bool | IsLogicalLauncher (void) |
pid_t | GetLeaderApplyWorkerPid (pid_t pid) |
Variables | |
PGDLLIMPORT int | max_logical_replication_workers |
PGDLLIMPORT int | max_sync_workers_per_subscription |
PGDLLIMPORT int | max_parallel_apply_workers_per_subscription |
void ApplyLauncherForgetWorkerStartTime | ( | Oid | subid | ) |
Definition at line 1081 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 process_syncing_tables_for_apply().
void ApplyLauncherMain | ( | Datum | main_arg | ) |
Definition at line 1128 of file launcher.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, ApplyLauncherGetWorkerStartTime(), ApplyLauncherSetWorkerStartTime(), Assert, BackgroundWorkerInitializeConnection(), BackgroundWorkerUnblockSignals(), before_shmem_exit(), CHECK_FOR_INTERRUPTS, ConfigReloadPending, Subscription::dbid, DEBUG1, DEFAULT_NAPTIME_PER_CYCLE, die, DSM_HANDLE_INVALID, Subscription::enabled, ereport, errmsg_internal(), get_subscription_list(), GetCurrentTimestamp(), InvalidOid, LogicalRepCtxStruct::launcher_pid, lfirst, logicalrep_launcher_onexit(), logicalrep_worker_find(), logicalrep_worker_launch(), LogicalRepCtx, LW_SHARED, LWLockAcquire(), LWLockRelease(), MemoryContextDelete(), MemoryContextSwitchTo(), Min, MyLatch, MyProcPid, Subscription::name, now(), Subscription::oid, Subscription::owner, PGC_SIGHUP, pqsignal(), ProcessConfigFile(), ResetLatch(), SIGHUP, SignalHandlerForConfigReload(), TimestampDifferenceMilliseconds(), TopMemoryContext, WaitLatch(), wal_retrieve_retry_interval, WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, WL_TIMEOUT, and WORKERTYPE_APPLY.
void ApplyLauncherRegister | ( | void | ) |
Definition at line 924 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().
void ApplyLauncherShmemInit | ( | void | ) |
Definition at line 960 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 905 of file launcher.c.
References add_size(), max_logical_replication_workers, MAXALIGN, mul_size(), and size.
Referenced by ApplyLauncherShmemInit(), and CalculateShmemSize().
void ApplyLauncherWakeupAtCommit | ( | void | ) |
Definition at line 1111 of file launcher.c.
References on_commit_launcher_wakeup.
Referenced by AlterSubscription(), AlterSubscriptionOwner_internal(), and CreateSubscription().
void AtEOXact_ApplyLauncher | ( | bool | isCommit | ) |
Definition at line 1092 of file launcher.c.
References ApplyLauncherWakeup(), and on_commit_launcher_wakeup.
Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().
pid_t GetLeaderApplyWorkerPid | ( | pid_t | pid | ) |
Definition at line 1259 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().
bool IsLogicalLauncher | ( | void | ) |
Definition at line 1249 of file launcher.c.
References LogicalRepCtxStruct::launcher_pid, LogicalRepCtx, and MyProcPid.
Referenced by ProcessInterrupts().
|
extern |
Definition at line 50 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().
|
extern |
Definition at line 52 of file launcher.c.
Referenced by logicalrep_worker_launch(), and pa_free_worker().
|
extern |
Definition at line 51 of file launcher.c.
Referenced by logicalrep_worker_launch(), and process_syncing_tables_for_apply().