PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/xlog.h"
#include "access/xlog_internal.h"
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/bgwriter.h"
#include "postmaster/interrupt.h"
#include "storage/buf_internals.h"
#include "storage/bufmgr.h"
#include "storage/condition_variable.h"
#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/lwlock.h"
#include "storage/proc.h"
#include "storage/procsignal.h"
#include "storage/shmem.h"
#include "storage/smgr.h"
#include "storage/spin.h"
#include "storage/standby.h"
#include "utils/guc.h"
#include "utils/memutils.h"
#include "utils/resowner.h"
#include "utils/timestamp.h"
Go to the source code of this file.
Macros | |
#define | HIBERNATE_FACTOR 50 |
#define | LOG_SNAPSHOT_INTERVAL_MS 15000 |
Functions | |
void | BackgroundWriterMain (void) |
Variables | |
int | BgWriterDelay = 200 |
static TimestampTz | last_snapshot_ts |
static XLogRecPtr | last_snapshot_lsn = InvalidXLogRecPtr |
#define HIBERNATE_FACTOR 50 |
Definition at line 67 of file bgwriter.c.
#define LOG_SNAPSHOT_INTERVAL_MS 15000 |
Definition at line 73 of file bgwriter.c.
void BackgroundWriterMain | ( | void | ) |
Definition at line 91 of file bgwriter.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, AtEOXact_Buffers(), AtEOXact_Files(), AtEOXact_HashTables(), AtEOXact_SMgr(), BgBufferSync(), bgwriter_flush_after, BgWriterDelay, ConditionVariableCancelSleep(), EmitErrorReport(), error_context_stack, FirstCallSinceLastCheckpoint(), FlushErrorState(), GetCurrentTimestamp(), GetLastImportantRecPtr(), HandleMainLoopInterrupts(), HIBERNATE_FACTOR, HOLD_INTERRUPTS, last_snapshot_lsn, last_snapshot_ts, LOG_SNAPSHOT_INTERVAL_MS, LogStandbySnapshot(), LWLockReleaseAll(), MemoryContextResetAndDeleteChildren, MemoryContextSwitchTo(), MyLatch, MyProc, now(), PG_exception_stack, pg_usleep(), PGPROC::pgprocno, pgstat_report_bgwriter(), pgstat_report_wait_end(), pqsignal(), procsignal_sigusr1_handler(), RecoveryInProgress(), ReleaseAuxProcessResources(), ResetLatch(), RESUME_INTERRUPTS, SIG_DFL, SIG_IGN, SIGALRM, SIGCHLD, SIGHUP, SignalHandlerForConfigReload(), SignalHandlerForShutdownRequest(), SIGPIPE, SIGUSR1, SIGUSR2, smgrcloseall(), StrategyNotifyBgWriter(), TimestampTzPlusMilliseconds, TopMemoryContext, UnBlockSig, UnlockBuffers(), WAIT_EVENT_BGWRITER_HIBERNATE, WAIT_EVENT_BGWRITER_MAIN, WaitLatch(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, WL_TIMEOUT, WritebackContextInit(), and XLogStandbyInfoActive.
Referenced by AuxiliaryProcessMain().
int BgWriterDelay = 200 |
Definition at line 61 of file bgwriter.c.
Referenced by BackgroundWriterMain(), and BgBufferSync().
|
static |
Definition at line 81 of file bgwriter.c.
Referenced by BackgroundWriterMain().
|
static |
Definition at line 80 of file bgwriter.c.
Referenced by BackgroundWriterMain().