Files
postgresql/src/include/replication/slotsync.h
Heikki Linnakangas aafc05de1b Refactor postmaster child process launching
Introduce new postmaster_child_launch() function that deals with the
differences in EXEC_BACKEND mode.

Refactor the mechanism of passing information from the parent to child
process. Instead of using different command-line arguments when
launching the child process in EXEC_BACKEND mode, pass a
variable-length blob of startup data along with all the global
variables. The contents of that blob depend on the kind of child
process being launched. In !EXEC_BACKEND mode, we use the same blob,
but it's simply inherited from the parent to child process.

Reviewed-by: Tristan Partin, Andres Freund
Discussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi
2024-03-18 11:35:30 +02:00

40 lines
1.2 KiB
C

/*-------------------------------------------------------------------------
*
* slotsync.h
* Exports for slot synchronization.
*
* Portions Copyright (c) 2016-2024, PostgreSQL Global Development Group
*
* src/include/replication/slotsync.h
*
*-------------------------------------------------------------------------
*/
#ifndef SLOTSYNC_H
#define SLOTSYNC_H
#include "replication/walreceiver.h"
extern PGDLLIMPORT bool sync_replication_slots;
/*
* GUCs needed by slot sync worker to connect to the primary
* server and carry on with slots synchronization.
*/
extern PGDLLIMPORT char *PrimaryConnInfo;
extern PGDLLIMPORT char *PrimarySlotName;
extern char *CheckAndGetDbnameFromConninfo(void);
extern bool ValidateSlotSyncParams(int elevel);
extern void ReplSlotSyncWorkerMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn();
extern int StartSlotSyncWorker(void);
extern void ShutDownSlotSync(void);
extern bool SlotSyncWorkerCanRestart(void);
extern bool IsSyncingReplicationSlots(void);
extern Size SlotSyncShmemSize(void);
extern void SlotSyncShmemInit(void);
extern void SyncReplicationSlots(WalReceiverConn *wrconn);
#endif /* SLOTSYNC_H */