63#define HIBERNATE_FACTOR 50
69#define LOG_SNAPSHOT_INTERVAL_MS 15000
89 sigjmp_buf local_sigjmp_buf;
94 Assert(startup_data_len == 0);
153 if (sigsetjmp(local_sigjmp_buf, 1) != 0)
216 prev_hibernate =
false;
287 if (
now >= timeout &&
327 if (rc ==
WL_TIMEOUT && can_hibernate && prev_hibernate)
335 WAIT_EVENT_BGWRITER_HIBERNATE);
340 prev_hibernate = can_hibernate;
void AuxiliaryProcessMainCommon(void)
TimestampTz GetCurrentTimestamp(void)
Datum now(PG_FUNCTION_ARGS)
static XLogRecPtr last_snapshot_lsn
static TimestampTz last_snapshot_ts
void BackgroundWriterMain(char *startup_data, size_t startup_data_len)
#define LOG_SNAPSHOT_INTERVAL_MS
void AtEOXact_Buffers(bool isCommit)
bool BgBufferSync(WritebackContext *wb_context)
void WritebackContextInit(WritebackContext *context, int *max_pending)
#define Assert(condition)
bool FirstCallSinceLastCheckpoint(void)
bool ConditionVariableCancelSleep(void)
void AtEOXact_HashTables(bool isCommit)
void EmitErrorReport(void)
ErrorContextCallback * error_context_stack
void FlushErrorState(void)
sigjmp_buf * PG_exception_stack
void AtEOXact_Files(bool isCommit)
void StrategyNotifyBgWriter(int bgwprocno)
void SignalHandlerForShutdownRequest(SIGNAL_ARGS)
void SignalHandlerForConfigReload(SIGNAL_ARGS)
void HandleMainLoopInterrupts(void)
void ResetLatch(Latch *latch)
int WaitLatch(Latch *latch, int wakeEvents, long timeout, uint32 wait_event_info)
#define WL_EXIT_ON_PM_DEATH
void LWLockReleaseAll(void)
void MemoryContextReset(MemoryContext context)
MemoryContext TopMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define RESUME_INTERRUPTS()
#define HOLD_INTERRUPTS()
BackendType MyBackendType
void pgstat_report_bgwriter(void)
void pgstat_report_wal(bool force)
pqsigfunc pqsignal(int signo, pqsigfunc func)
void procsignal_sigusr1_handler(SIGNAL_ARGS)
MemoryContextSwitchTo(old_ctx)
void ReleaseAuxProcessResources(bool isCommit)
void pg_usleep(long microsec)
void smgrdestroyall(void)
XLogRecPtr LogStandbySnapshot(void)
#define TimestampTzPlusMilliseconds(tz, ms)
static void pgstat_report_wait_end(void)
bool RecoveryInProgress(void)
XLogRecPtr GetLastImportantRecPtr(void)
#define XLogStandbyInfoActive()
#define InvalidXLogRecPtr