PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <signal.h>
#include <unistd.h>
#include "access/xlog.h"
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/interrupt.h"
#include "postmaster/walwriter.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/smgr.h"
#include "utils/guc.h"
#include "utils/hsearch.h"
#include "utils/memutils.h"
#include "utils/resowner.h"
Go to the source code of this file.
Macros | |
#define | LOOPS_UNTIL_HIBERNATE 50 |
#define | HIBERNATE_FACTOR 25 |
Functions | |
static void | HandleWalWriterInterrupts (void) |
void | WalWriterMain (void) |
Variables | |
int | WalWriterDelay = 200 |
int | WalWriterFlushAfter = DEFAULT_WAL_WRITER_FLUSH_AFTER |
#define HIBERNATE_FACTOR 25 |
Definition at line 79 of file walwriter.c.
#define LOOPS_UNTIL_HIBERNATE 50 |
Definition at line 78 of file walwriter.c.
|
static |
Definition at line 283 of file walwriter.c.
References ConfigReloadPending, LogMemoryContextPending, PGC_SIGHUP, proc_exit(), ProcessConfigFile(), ProcessLogMemoryContextInterrupt(), ProcessProcSignalBarrier(), ProcSignalBarrierPending, and ShutdownRequestPending.
Referenced by WalWriterMain().
void WalWriterMain | ( | void | ) |
Definition at line 91 of file walwriter.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, AtEOXact_Buffers(), AtEOXact_Files(), AtEOXact_HashTables(), AtEOXact_SMgr(), ConditionVariableCancelSleep(), EmitErrorReport(), error_context_stack, FlushErrorState(), HandleWalWriterInterrupts(), HIBERNATE_FACTOR, HOLD_INTERRUPTS, LOOPS_UNTIL_HIBERNATE, LWLockReleaseAll(), MemoryContextResetAndDeleteChildren, MemoryContextSwitchTo(), MyLatch, MyProc, PG_exception_stack, pg_usleep(), pgstat_report_wait_end(), pgstat_report_wal(), pqsignal(), ProcGlobal, PGPROC::procLatch, procsignal_sigusr1_handler(), ReleaseAuxProcessResources(), ResetLatch(), RESUME_INTERRUPTS, SetWalWriterSleeping(), SIG_DFL, SIG_IGN, SIGALRM, SIGCHLD, SIGHUP, SignalHandlerForConfigReload(), SignalHandlerForShutdownRequest(), SIGPIPE, SIGUSR1, SIGUSR2, smgrcloseall(), TopMemoryContext, UnBlockSig, UnlockBuffers(), WaitLatch(), WalWriterDelay, PROC_HDR::walwriterLatch, WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, WL_TIMEOUT, and XLogBackgroundFlush().
Referenced by AuxiliaryProcessMain().
int WalWriterDelay = 200 |
Definition at line 70 of file walwriter.c.
Referenced by LogicalRepApplyLoop(), WalWriterMain(), and XLogBackgroundFlush().
int WalWriterFlushAfter = DEFAULT_WAL_WRITER_FLUSH_AFTER |
Definition at line 71 of file walwriter.c.
Referenced by XLogBackgroundFlush().