PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/xlog.h"
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/auxprocess.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/lwlock.h"
#include "storage/proc.h"
#include "storage/procsignal.h"
#include "storage/smgr.h"
#include "storage/standby.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 (char *startup_data, size_t startup_data_len) |
Variables | |
int | BgWriterDelay = 200 |
static TimestampTz | last_snapshot_ts |
static XLogRecPtr | last_snapshot_lsn = InvalidXLogRecPtr |
#define HIBERNATE_FACTOR 50 |
Definition at line 63 of file bgwriter.c.
#define LOG_SNAPSHOT_INTERVAL_MS 15000 |
Definition at line 69 of file bgwriter.c.
void BackgroundWriterMain | ( | char * | startup_data, |
size_t | startup_data_len | ||
) |
Definition at line 87 of file bgwriter.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, AtEOXact_Buffers(), AtEOXact_Files(), AtEOXact_HashTables(), AtEOXact_SMgr(), AuxiliaryProcessMainCommon(), B_BG_WRITER, 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(), MemoryContextReset(), MemoryContextSwitchTo(), MyBackendType, MyLatch, MyProcNumber, now(), PG_exception_stack, pg_usleep(), pgstat_report_bgwriter(), pgstat_report_wait_end(), pgstat_report_wal(), pqsignal(), procsignal_sigusr1_handler(), RecoveryInProgress(), ReleaseAuxProcessResources(), ResetLatch(), RESUME_INTERRUPTS, SIG_DFL, SIG_IGN, SIGALRM, SIGCHLD, SIGHUP, SignalHandlerForConfigReload(), SignalHandlerForShutdownRequest(), SIGPIPE, SIGUSR1, SIGUSR2, smgrdestroyall(), StrategyNotifyBgWriter(), TimestampTzPlusMilliseconds, TopMemoryContext, UnBlockSig, UnlockBuffers(), WaitLatch(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, WL_TIMEOUT, WritebackContextInit(), and XLogStandbyInfoActive.
int BgWriterDelay = 200 |
Definition at line 57 of file bgwriter.c.
Referenced by BackgroundWriterMain(), and BgBufferSync().
|
static |
Definition at line 77 of file bgwriter.c.
Referenced by BackgroundWriterMain().
|
static |
Definition at line 76 of file bgwriter.c.
Referenced by BackgroundWriterMain().