|
PostgreSQL Source Code git master
|
#include "access/xlogdefs.h"#include "lib/pairingheap.h"#include "port/atomics.h"#include "storage/procnumber.h"#include "storage/spin.h"#include "tcop/dest.h"

Go to the source code of this file.
Data Structures | |
| struct | WaitLSNProcInfo |
| struct | WaitLSNState |
Macros | |
| #define | WAIT_LSN_TYPE_COUNT (WAIT_LSN_TYPE_PRIMARY_FLUSH + 1) |
Typedefs | |
| typedef enum WaitLSNType | WaitLSNType |
| typedef struct WaitLSNProcInfo | WaitLSNProcInfo |
| typedef struct WaitLSNState | WaitLSNState |
Functions | |
| Size | WaitLSNShmemSize (void) |
| void | WaitLSNShmemInit (void) |
| XLogRecPtr | GetCurrentLSNForWaitType (WaitLSNType lsnType) |
| void | WaitLSNWakeup (WaitLSNType lsnType, XLogRecPtr currentLSN) |
| void | WaitLSNCleanup (void) |
| WaitLSNResult | WaitForLSN (WaitLSNType lsnType, XLogRecPtr targetLSN, int64 timeout) |
Variables | |
| PGDLLIMPORT WaitLSNState * | waitLSNState |
| #define WAIT_LSN_TYPE_COUNT (WAIT_LSN_TYPE_PRIMARY_FLUSH + 1) |
Definition at line 47 of file xlogwait.h.
| Enumerator | |
|---|---|
| WAIT_LSN_RESULT_SUCCESS | |
| WAIT_LSN_RESULT_NOT_IN_RECOVERY | |
| WAIT_LSN_RESULT_TIMEOUT | |
Definition at line 25 of file xlogwait.h.
| Enumerator | |
|---|---|
| WAIT_LSN_TYPE_STANDBY_REPLAY | |
| WAIT_LSN_TYPE_STANDBY_WRITE | |
| WAIT_LSN_TYPE_STANDBY_FLUSH | |
| WAIT_LSN_TYPE_PRIMARY_FLUSH | |
Definition at line 36 of file xlogwait.h.
|
extern |
Definition at line 88 of file xlogwait.c.
References Assert, elog, ERROR, fb(), GetFlushRecPtr(), GetWalRcvFlushRecPtr(), GetWalRcvWriteRecPtr(), GetXLogReplayRecPtr(), pg_unreachable, WAIT_LSN_TYPE_COUNT, WAIT_LSN_TYPE_PRIMARY_FLUSH, WAIT_LSN_TYPE_STANDBY_FLUSH, WAIT_LSN_TYPE_STANDBY_REPLAY, and WAIT_LSN_TYPE_STANDBY_WRITE.
Referenced by ExecWaitStmt(), and WaitForLSN().
|
extern |
Definition at line 375 of file xlogwait.c.
References addLSNWaiter(), Assert, CHECK_FOR_INTERRUPTS, deleteLSNWaiter(), ereport, errcode(), errcontext, errmsg(), FATAL, fb(), GetCurrentLSNForWaitType(), GetCurrentTimestamp(), MaxBackends, MyLatch, MyProcNumber, NUM_AUXILIARY_PROCS, PromoteIsTriggered(), RecoveryInProgress(), ResetLatch(), TimestampDifferenceMilliseconds(), TimestampTzPlusMilliseconds, WAIT_LSN_RESULT_NOT_IN_RECOVERY, WAIT_LSN_RESULT_SUCCESS, WAIT_LSN_RESULT_TIMEOUT, WaitLatch(), waitLSNState, WaitLSNTypeRequiresRecovery(), WaitLSNWaitEvents, WL_LATCH_SET, WL_POSTMASTER_DEATH, and WL_TIMEOUT.
Referenced by ExecWaitStmt().
Definition at line 338 of file xlogwait.c.
References deleteLSNWaiter(), WaitLSNProcInfo::inHeap, WaitLSNProcInfo::lsnType, MyProcNumber, WaitLSNState::procInfos, and waitLSNState.
Referenced by AbortTransaction(), and ProcKill().
Definition at line 124 of file xlogwait.c.
References fb(), i, MaxBackends, WaitLSNState::minWaitedLSN, NUM_AUXILIARY_PROCS, pairingheap_initialize(), pg_atomic_init_u64(), PG_UINT64_MAX, WaitLSNState::procInfos, ShmemInitStruct(), WAIT_LSN_TYPE_COUNT, WaitLSNState::waitersHeap, waitlsn_cmp(), WaitLSNShmemSize(), and waitLSNState.
Referenced by CreateOrAttachShmemStructs().
Definition at line 113 of file xlogwait.c.
References add_size(), fb(), MaxBackends, mul_size(), NUM_AUXILIARY_PROCS, and WaitLSNState::procInfos.
Referenced by CalculateShmemSize(), and WaitLSNShmemInit().
|
extern |
Definition at line 317 of file xlogwait.c.
References Assert, fb(), i, WaitLSNState::minWaitedLSN, pg_atomic_read_u64(), WAIT_LSN_TYPE_COUNT, waitLSNState, wakeupWaiters(), and XLogRecPtrIsValid.
Referenced by PerformWalRecovery(), StartupXLOG(), XLogBackgroundFlush(), XLogFlush(), XLogWalRcvFlush(), and XLogWalRcvWrite().
|
extern |
Definition at line 68 of file xlogwait.c.
Referenced by addLSNWaiter(), deleteLSNWaiter(), PerformWalRecovery(), updateMinWaitedLSN(), WaitForLSN(), WaitLSNCleanup(), WaitLSNShmemInit(), WaitLSNWakeup(), wakeupWaiters(), XLogBackgroundFlush(), XLogFlush(), XLogWalRcvFlush(), and XLogWalRcvWrite().