40#define WALRCV_STARTUP_TIMEOUT 10
101 bool stopped =
false;
152 bool stopped =
false;
183 bool stopped =
false;
206 walrcvpid = walrcv->
pid;
219 kill(walrcvpid, SIGTERM);
228 WAIT_EVENT_WAL_RECEIVER_EXIT);
247 const char *slotname,
bool create_temp_slot)
269 if (conninfo != NULL)
280 if (slotname != NULL && slotname[0] !=
'\0')
313 walrcv_proc = walrcv->
procno;
339 if (latestChunkStart)
378 if (receivePtr == replayPtr)
383 if (chunkReplayStartTime == 0)
static void pg_atomic_init_u64(volatile pg_atomic_uint64 *ptr, uint64 val)
static uint64 pg_atomic_read_u64(volatile pg_atomic_uint64 *ptr)
long TimestampDifferenceMilliseconds(TimestampTz start_time, TimestampTz stop_time)
TimestampTz GetCurrentTimestamp(void)
Datum now(PG_FUNCTION_ARGS)
#define Assert(condition)
#define MemSet(start, val, len)
bool ConditionVariableCancelSleep(void)
void ConditionVariableBroadcast(ConditionVariable *cv)
void ConditionVariablePrepareToSleep(ConditionVariable *cv)
void ConditionVariableInit(ConditionVariable *cv)
void ConditionVariableSleep(ConditionVariable *cv, uint32 wait_event_info)
void SetLatch(Latch *latch)
void SendPostmasterSignal(PMSignalReason reason)
@ PMSIGNAL_START_WALRECEIVER
size_t strlcpy(char *dst, const char *src, size_t siz)
#define GetPGProcByNumber(n)
#define INVALID_PROC_NUMBER
Size add_size(Size s1, Size s2)
void * ShmemInitStruct(const char *name, Size size, bool *foundPtr)
static pg_noinline void Size size
#define SpinLockInit(lock)
#define SpinLockRelease(lock)
#define SpinLockAcquire(lock)
TimestampTz lastMsgReceiptTime
TimeLineID receiveStartTLI
char slotname[NAMEDATALEN]
XLogRecPtr latestChunkStart
ConditionVariable walRcvStoppedCV
pg_atomic_uint64 writtenUpto
TimestampTz lastMsgSendTime
char conninfo[MAXCONNINFO]
XLogRecPtr GetWalRcvFlushRecPtr(XLogRecPtr *latestChunkStart, TimeLineID *receiveTLI)
bool WalRcvStreaming(void)
void RequestXLogStreaming(TimeLineID tli, XLogRecPtr recptr, const char *conninfo, const char *slotname, bool create_temp_slot)
XLogRecPtr GetWalRcvWriteRecPtr(void)
void ShutdownWalRcv(void)
#define WALRCV_STARTUP_TIMEOUT
int GetReplicationApplyDelay(void)
void WalRcvShmemInit(void)
Size WalRcvShmemSize(void)
int GetReplicationTransferLatency(void)
#define XLogSegmentOffset(xlogptr, wal_segsz_bytes)
static TimeLineID receiveTLI
TimestampTz GetCurrentChunkReplayStartTime(void)
XLogRecPtr GetXLogReplayRecPtr(TimeLineID *replayTLI)