| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef _WALSENDER_H |
| #define _WALSENDER_H |
|
|
| #include "access/xlogdefs.h" |
|
|
| |
| |
| |
| typedef enum |
| { |
| CRS_EXPORT_SNAPSHOT, |
| CRS_NOEXPORT_SNAPSHOT, |
| CRS_USE_SNAPSHOT, |
| } CRSSnapshotAction; |
|
|
| |
| extern PGDLLIMPORT bool am_walsender; |
| extern PGDLLIMPORT bool am_cascading_walsender; |
| extern PGDLLIMPORT bool am_db_walsender; |
| extern PGDLLIMPORT bool wake_wal_senders; |
|
|
| |
| extern PGDLLIMPORT int max_wal_senders; |
| extern PGDLLIMPORT int wal_sender_timeout; |
| extern PGDLLIMPORT bool log_replication_commands; |
|
|
| extern void InitWalSender(void); |
| extern bool exec_replication_command(const char *cmd_string); |
| extern void WalSndErrorCleanup(void); |
| extern void WalSndResourceCleanup(bool isCommit); |
| extern void PhysicalWakeupLogicalWalSnd(void); |
| extern XLogRecPtr GetStandbyFlushRecPtr(TimeLineID *tli); |
| extern void WalSndSignals(void); |
| extern Size WalSndShmemSize(void); |
| extern void WalSndShmemInit(void); |
| extern void WalSndWakeup(bool physical, bool logical); |
| extern void WalSndInitStopping(void); |
| extern void WalSndWaitStopping(void); |
| extern void HandleWalSndInitStopping(void); |
| extern void WalSndRqstFileReload(void); |
|
|
| |
| |
| |
| |
| |
| |
| #define WalSndWakeupRequest() \ |
| do { wake_wal_senders = true; } while (0) |
|
|
| |
| |
| |
| static inline void |
| WalSndWakeupProcessRequests(bool physical, bool logical) |
| { |
| if (wake_wal_senders) |
| { |
| wake_wal_senders = false; |
| if (max_wal_senders > 0) |
| WalSndWakeup(physical, logical); |
| } |
| } |
|
|
| #endif |
|
|