PostgreSQL Source Code git master
logicallauncher.h File Reference
This graph shows which files directly or indirectly include this file:

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 ApplyLauncherWakeup (void)
 
void AtEOXact_ApplyLauncher (bool isCommit)
 
void CreateConflictDetectionSlot (void)
 
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
 

Function Documentation

◆ ApplyLauncherForgetWorkerStartTime()

void ApplyLauncherForgetWorkerStartTime ( Oid  subid)

Definition at line 1154 of file launcher.c.

1155{
1157
1158 (void) dshash_delete_key(last_start_times, &subid);
1159}
bool dshash_delete_key(dshash_table *hash_table, const void *key)
Definition: dshash.c:505
static dshash_table * last_start_times
Definition: launcher.c:91
static void logicalrep_launcher_attach_dshmem(void)
Definition: launcher.c:1068

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().

◆ ApplyLauncherMain()

void ApplyLauncherMain ( Datum  main_arg)

Definition at line 1204 of file launcher.c.

1205{
1207 (errmsg_internal("logical replication launcher started")));
1208
1210
1213
1214 /* Establish signal handlers. */
1216 pqsignal(SIGTERM, die);
1218
1219 /*
1220 * Establish connection to nailed catalogs (we only ever access
1221 * pg_subscription).
1222 */
1224
1225 /*
1226 * Acquire the conflict detection slot at startup to ensure it can be
1227 * dropped if no longer needed after a restart.
1228 */
1230
1231 /* Enter main loop */
1232 for (;;)
1233 {
1234 int rc;
1235 List *sublist;
1236 ListCell *lc;
1237 MemoryContext subctx;
1238 MemoryContext oldctx;
1239 long wait_time = DEFAULT_NAPTIME_PER_CYCLE;
1240 bool can_update_xmin = true;
1241 bool retain_dead_tuples = false;
1243
1245
1246 /* Use temporary context to avoid leaking memory across cycles. */
1248 "Logical Replication Launcher sublist",
1250 oldctx = MemoryContextSwitchTo(subctx);
1251
1252 /*
1253 * Start any missing workers for enabled subscriptions.
1254 *
1255 * Also, during the iteration through all subscriptions, we compute
1256 * the minimum XID required to protect deleted tuples for conflict
1257 * detection if one of the subscription enables retain_dead_tuples
1258 * option.
1259 */
1260 sublist = get_subscription_list();
1261 foreach(lc, sublist)
1262 {
1263 Subscription *sub = (Subscription *) lfirst(lc);
1265 TimestampTz last_start;
1267 long elapsed;
1268
1269 if (sub->retaindeadtuples)
1270 {
1271 retain_dead_tuples = true;
1272
1273 /*
1274 * Create a replication slot to retain information necessary
1275 * for conflict detection such as dead tuples, commit
1276 * timestamps, and origins.
1277 *
1278 * The slot is created before starting the apply worker to
1279 * prevent it from unnecessarily maintaining its
1280 * oldest_nonremovable_xid.
1281 *
1282 * The slot is created even for a disabled subscription to
1283 * ensure that conflict-related information is available when
1284 * applying remote changes that occurred before the
1285 * subscription was enabled.
1286 */
1288
1289 if (sub->retentionactive)
1290 {
1291 /*
1292 * Can't advance xmin of the slot unless all the
1293 * subscriptions actively retaining dead tuples are
1294 * enabled. This is required to ensure that we don't
1295 * advance the xmin of CONFLICT_DETECTION_SLOT if one of
1296 * the subscriptions is not enabled. Otherwise, we won't
1297 * be able to detect conflicts reliably for such a
1298 * subscription even though it has set the
1299 * retain_dead_tuples option.
1300 */
1301 can_update_xmin &= sub->enabled;
1302
1303 /*
1304 * Initialize the slot once the subscription activates
1305 * retention.
1306 */
1309 }
1310 }
1311
1312 if (!sub->enabled)
1313 continue;
1314
1315 LWLockAcquire(LogicalRepWorkerLock, LW_SHARED);
1317 false);
1318
1319 if (w != NULL)
1320 {
1321 /*
1322 * Compute the minimum xmin required to protect dead tuples
1323 * required for conflict detection among all running apply
1324 * workers. This computation is performed while holding
1325 * LogicalRepWorkerLock to prevent accessing invalid worker
1326 * data, in scenarios where a worker might exit and reset its
1327 * state concurrently.
1328 */
1329 if (sub->retaindeadtuples &&
1330 sub->retentionactive &&
1331 can_update_xmin)
1333
1334 LWLockRelease(LogicalRepWorkerLock);
1335
1336 /* worker is running already */
1337 continue;
1338 }
1339
1340 LWLockRelease(LogicalRepWorkerLock);
1341
1342 /*
1343 * Can't advance xmin of the slot unless all the workers
1344 * corresponding to subscriptions actively retaining dead tuples
1345 * are running, disabling the further computation of the minimum
1346 * nonremovable xid.
1347 */
1348 if (sub->retaindeadtuples && sub->retentionactive)
1349 can_update_xmin = false;
1350
1351 /*
1352 * If the worker is eligible to start now, launch it. Otherwise,
1353 * adjust wait_time so that we'll wake up as soon as it can be
1354 * started.
1355 *
1356 * Each subscription's apply worker can only be restarted once per
1357 * wal_retrieve_retry_interval, so that errors do not cause us to
1358 * repeatedly restart the worker as fast as possible. In cases
1359 * where a restart is expected (e.g., subscription parameter
1360 * changes), another process should remove the last-start entry
1361 * for the subscription so that the worker can be restarted
1362 * without waiting for wal_retrieve_retry_interval to elapse.
1363 */
1364 last_start = ApplyLauncherGetWorkerStartTime(sub->oid);
1366 if (last_start == 0 ||
1368 {
1371 sub->dbid, sub->oid, sub->name,
1372 sub->owner, InvalidOid,
1374 sub->retaindeadtuples &&
1375 sub->retentionactive))
1376 {
1377 /*
1378 * We get here either if we failed to launch a worker
1379 * (perhaps for resource-exhaustion reasons) or if we
1380 * launched one but it immediately quit. Either way, it
1381 * seems appropriate to try again after
1382 * wal_retrieve_retry_interval.
1383 */
1384 wait_time = Min(wait_time,
1386 }
1387 }
1388 else
1389 {
1390 wait_time = Min(wait_time,
1391 wal_retrieve_retry_interval - elapsed);
1392 }
1393 }
1394
1395 /*
1396 * Drop the CONFLICT_DETECTION_SLOT slot if there is no subscription
1397 * that requires us to retain dead tuples. Otherwise, if required,
1398 * advance the slot's xmin to protect dead tuples required for the
1399 * conflict detection.
1400 *
1401 * Additionally, if all apply workers for subscriptions with
1402 * retain_dead_tuples enabled have requested to stop retention, the
1403 * slot's xmin will be set to InvalidTransactionId allowing the
1404 * removal of dead tuples.
1405 */
1407 {
1408 if (!retain_dead_tuples)
1410 else if (can_update_xmin)
1412 }
1413
1414 /* Switch back to original memory context. */
1415 MemoryContextSwitchTo(oldctx);
1416 /* Clean the temporary memory. */
1417 MemoryContextDelete(subctx);
1418
1419 /* Wait for more work. */
1420 rc = WaitLatch(MyLatch,
1422 wait_time,
1423 WAIT_EVENT_LOGICAL_LAUNCHER_MAIN);
1424
1425 if (rc & WL_LATCH_SET)
1426 {
1429 }
1430
1432 {
1433 ConfigReloadPending = false;
1435 }
1436 }
1437
1438 /* Not reachable */
1439}
long TimestampDifferenceMilliseconds(TimestampTz start_time, TimestampTz stop_time)
Definition: timestamp.c:1757
TimestampTz GetCurrentTimestamp(void)
Definition: timestamp.c:1645
Datum now(PG_FUNCTION_ARGS)
Definition: timestamp.c:1609
void BackgroundWorkerInitializeConnection(const char *dbname, const char *username, uint32 flags)
Definition: bgworker.c:856
void BackgroundWorkerUnblockSignals(void)
Definition: bgworker.c:930
#define Min(x, y)
Definition: c.h:1006
uint32 TransactionId
Definition: c.h:660
int64 TimestampTz
Definition: timestamp.h:39
#define DSM_HANDLE_INVALID
Definition: dsm_impl.h:58
int errmsg_internal(const char *fmt,...)
Definition: elog.c:1170
#define DEBUG1
Definition: elog.h:30
#define ereport(elevel,...)
Definition: elog.h:150
int MyProcPid
Definition: globals.c:47
struct Latch * MyLatch
Definition: globals.c:63
void ProcessConfigFile(GucContext context)
Definition: guc-file.l:120
@ PGC_SIGHUP
Definition: guc.h:75
Assert(PointerIsAligned(start, uint64))
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:337
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 DEFAULT_NAPTIME_PER_CYCLE
Definition: launcher.c:49
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: launcher.c:324
static void ApplyLauncherSetWorkerStartTime(Oid subid, TimestampTz start_time)
Definition: launcher.c:1112
LogicalRepWorker * logicalrep_worker_find(LogicalRepWorkerType wtype, Oid subid, Oid relid, bool only_running)
Definition: launcher.c:258
static void update_conflict_slot_xmin(TransactionId new_xmin)
Definition: launcher.c:1499
static void compute_min_nonremovable_xid(LogicalRepWorker *worker, TransactionId *xmin)
Definition: launcher.c:1447
static void logicalrep_launcher_onexit(int code, Datum arg)
Definition: launcher.c:859
void CreateConflictDetectionSlot(void)
Definition: launcher.c:1566
static void init_conflict_slot_xmin(void)
Definition: launcher.c:1535
static TimestampTz ApplyLauncherGetWorkerStartTime(Oid subid)
Definition: launcher.c:1128
static LogicalRepCtxStruct * LogicalRepCtx
Definition: launcher.c:71
static bool acquire_conflict_slot_if_exists(void)
Definition: launcher.c:1485
static List * get_subscription_list(void)
Definition: launcher.c:117
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
Definition: lwlock.c:1174
void LWLockRelease(LWLock *lock)
Definition: lwlock.c:1894
@ LW_SHARED
Definition: lwlock.h:113
MemoryContext TopMemoryContext
Definition: mcxt.c:166
void MemoryContextDelete(MemoryContext context)
Definition: mcxt.c:469
#define AllocSetContextCreate
Definition: memutils.h:129
#define ALLOCSET_DEFAULT_SIZES
Definition: memutils.h:160
#define CHECK_FOR_INTERRUPTS()
Definition: miscadmin.h:123
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:124
#define lfirst(lc)
Definition: pg_list.h:172
#define die(msg)
#define pqsignal
Definition: port.h:552
uint64_t Datum
Definition: postgres.h:70
#define InvalidOid
Definition: postgres_ext.h:37
void ReplicationSlotDropAcquired(void)
Definition: slot.c:997
ReplicationSlot * MyReplicationSlot
Definition: slot.c:148
Definition: pg_list.h:54
TransactionId xmin
Definition: slot.h:114
ReplicationSlotPersistentData data
Definition: slot.h:210
#define InvalidTransactionId
Definition: transam.h:31
#define TransactionIdIsValid(xid)
Definition: transam.h:41
#define WL_TIMEOUT
Definition: waiteventset.h:37
#define WL_EXIT_ON_PM_DEATH
Definition: waiteventset.h:39
#define WL_LATCH_SET
Definition: waiteventset.h:34
#define SIGHUP
Definition: win32_port.h:158
@ WORKERTYPE_APPLY
int wal_retrieve_retry_interval
Definition: xlog.c:136

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.

◆ ApplyLauncherRegister()

void ApplyLauncherRegister ( void  )

Definition at line 997 of file launcher.c.

998{
1000
1001 /*
1002 * The logical replication launcher is disabled during binary upgrades, to
1003 * prevent logical replication workers from running on the source cluster.
1004 * That could cause replication origins to move forward after having been
1005 * copied to the target cluster, potentially creating conflicts with the
1006 * copied data files.
1007 */
1009 return;
1010
1011 memset(&bgw, 0, sizeof(bgw));
1015 snprintf(bgw.bgw_library_name, MAXPGPATH, "postgres");
1016 snprintf(bgw.bgw_function_name, BGW_MAXLEN, "ApplyLauncherMain");
1018 "logical replication launcher");
1020 "logical replication launcher");
1021 bgw.bgw_restart_time = 5;
1022 bgw.bgw_notify_pid = 0;
1023 bgw.bgw_main_arg = (Datum) 0;
1024
1026}
void RegisterBackgroundWorker(BackgroundWorker *worker)
Definition: bgworker.c:943
@ BgWorkerStart_RecoveryFinished
Definition: bgworker.h:81
#define BGWORKER_BACKEND_DATABASE_CONNECTION
Definition: bgworker.h:60
#define BGWORKER_SHMEM_ACCESS
Definition: bgworker.h:53
#define BGW_MAXLEN
Definition: bgworker.h:86
bool IsBinaryUpgrade
Definition: globals.c:121
int max_logical_replication_workers
Definition: launcher.c:52
#define MAXPGPATH
#define snprintf
Definition: port.h:260
char bgw_function_name[BGW_MAXLEN]
Definition: bgworker.h:97
Datum bgw_main_arg
Definition: bgworker.h:98
char bgw_name[BGW_MAXLEN]
Definition: bgworker.h:91
int bgw_restart_time
Definition: bgworker.h:95
char bgw_type[BGW_MAXLEN]
Definition: bgworker.h:92
BgWorkerStartTime bgw_start_time
Definition: bgworker.h:94
pid_t bgw_notify_pid
Definition: bgworker.h:100
char bgw_library_name[MAXPGPATH]
Definition: bgworker.h:96

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().

◆ ApplyLauncherShmemInit()

void ApplyLauncherShmemInit ( void  )

Definition at line 1033 of file launcher.c.

1034{
1035 bool found;
1036
1038 ShmemInitStruct("Logical Replication Launcher Data",
1040 &found);
1041
1042 if (!found)
1043 {
1044 int slot;
1045
1047
1050
1051 /* Initialize memory and spin locks for each worker slot. */
1052 for (slot = 0; slot < max_logical_replication_workers; slot++)
1053 {
1054 LogicalRepWorker *worker = &LogicalRepCtx->workers[slot];
1055
1056 memset(worker, 0, sizeof(LogicalRepWorker));
1057 SpinLockInit(&worker->relmutex);
1058 }
1059 }
1060}
#define DSA_HANDLE_INVALID
Definition: dsa.h:139
#define DSHASH_HANDLE_INVALID
Definition: dshash.h:27
Size ApplyLauncherShmemSize(void)
Definition: launcher.c:978
void * ShmemInitStruct(const char *name, Size size, bool *foundPtr)
Definition: shmem.c:389
#define SpinLockInit(lock)
Definition: spin.h:57
dsa_handle last_start_dsa
Definition: launcher.c:64
dshash_table_handle last_start_dsh
Definition: launcher.c:65
LogicalRepWorker workers[FLEXIBLE_ARRAY_MEMBER]
Definition: launcher.c:68

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().

◆ ApplyLauncherShmemSize()

Size ApplyLauncherShmemSize ( void  )

Definition at line 978 of file launcher.c.

979{
980 Size size;
981
982 /*
983 * Need the fixed struct and the array of LogicalRepWorker.
984 */
985 size = sizeof(LogicalRepCtxStruct);
986 size = MAXALIGN(size);
988 sizeof(LogicalRepWorker)));
989 return size;
990}
#define MAXALIGN(LEN)
Definition: c.h:813
size_t Size
Definition: c.h:613
struct LogicalRepCtxStruct LogicalRepCtxStruct
Size add_size(Size s1, Size s2)
Definition: shmem.c:495
Size mul_size(Size s1, Size s2)
Definition: shmem.c:510

References add_size(), max_logical_replication_workers, MAXALIGN, and mul_size().

Referenced by ApplyLauncherShmemInit(), and CalculateShmemSize().

◆ ApplyLauncherWakeup()

void ApplyLauncherWakeup ( void  )

Definition at line 1194 of file launcher.c.

1195{
1196 if (LogicalRepCtx->launcher_pid != 0)
1198}
#define kill(pid, sig)
Definition: win32_port.h:493
#define SIGUSR1
Definition: win32_port.h:170

References kill, LogicalRepCtxStruct::launcher_pid, LogicalRepCtx, and SIGUSR1.

Referenced by AtEOXact_ApplyLauncher(), logicalrep_worker_onexit(), update_retention_status(), and wait_for_local_flush().

◆ ApplyLauncherWakeupAtCommit()

void ApplyLauncherWakeupAtCommit ( void  )

Definition at line 1184 of file launcher.c.

1185{
1188}
static bool on_commit_launcher_wakeup
Definition: launcher.c:93

References on_commit_launcher_wakeup.

Referenced by AlterSubscription(), AlterSubscriptionOwner_internal(), and CreateSubscription().

◆ AtEOXact_ApplyLauncher()

void AtEOXact_ApplyLauncher ( bool  isCommit)

Definition at line 1165 of file launcher.c.

1166{
1167 if (isCommit)
1168 {
1171 }
1172
1174}
void ApplyLauncherWakeup(void)
Definition: launcher.c:1194

References ApplyLauncherWakeup(), and on_commit_launcher_wakeup.

Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().

◆ CreateConflictDetectionSlot()

void CreateConflictDetectionSlot ( void  )

Definition at line 1566 of file launcher.c.

1567{
1568 /* Exit early, if the replication slot is already created and acquired */
1570 return;
1571
1572 ereport(LOG,
1573 errmsg("creating replication conflict detection slot"));
1574
1576 false, false);
1577
1579}
int errmsg(const char *fmt,...)
Definition: elog.c:1080
#define LOG
Definition: elog.h:31
void ReplicationSlotCreate(const char *name, bool db_specific, ReplicationSlotPersistency persistency, bool two_phase, bool failover, bool synced)
Definition: slot.c:384
#define CONFLICT_DETECTION_SLOT
Definition: slot.h:28
@ RS_PERSISTENT
Definition: slot.h:45

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().

◆ GetLeaderApplyWorkerPid()

pid_t GetLeaderApplyWorkerPid ( pid_t  pid)

Definition at line 1595 of file launcher.c.

1596{
1597 int leader_pid = InvalidPid;
1598 int i;
1599
1600 LWLockAcquire(LogicalRepWorkerLock, LW_SHARED);
1601
1602 for (i = 0; i < max_logical_replication_workers; i++)
1603 {
1605
1606 if (isParallelApplyWorker(w) && w->proc && pid == w->proc->pid)
1607 {
1608 leader_pid = w->leader_pid;
1609 break;
1610 }
1611 }
1612
1613 LWLockRelease(LogicalRepWorkerLock);
1614
1615 return leader_pid;
1616}
int i
Definition: isn.c:77
#define InvalidPid
Definition: miscadmin.h:32
int pid
Definition: proc.h:199
#define isParallelApplyWorker(worker)

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().

◆ IsLogicalLauncher()

bool IsLogicalLauncher ( void  )

Variable Documentation

◆ max_logical_replication_workers

◆ max_parallel_apply_workers_per_subscription

PGDLLIMPORT int max_parallel_apply_workers_per_subscription
extern

Definition at line 54 of file launcher.c.

Referenced by logicalrep_worker_launch(), and pa_free_worker().

◆ max_sync_workers_per_subscription

PGDLLIMPORT int max_sync_workers_per_subscription
extern

Definition at line 53 of file launcher.c.

Referenced by launch_sync_worker(), and logicalrep_worker_launch().