PostgreSQL Source Code
git master
|
#include "access/xlogdefs.h"
Go to the source code of this file.
Functions | |
Size | WalSummarizerShmemSize (void) |
void | WalSummarizerShmemInit (void) |
void | WalSummarizerMain (char *startup_data, size_t startup_data_len) pg_attribute_noreturn() |
void | GetWalSummarizerState (TimeLineID *summarized_tli, XLogRecPtr *summarized_lsn, XLogRecPtr *pending_lsn, int *summarizer_pid) |
XLogRecPtr | GetOldestUnsummarizedLSN (TimeLineID *tli, bool *lsn_is_exact) |
void | SetWalSummarizerLatch (void) |
void | WaitForWalSummarization (XLogRecPtr lsn) |
Variables | |
PGDLLIMPORT bool | summarize_wal |
PGDLLIMPORT int | wal_summary_keep_time |
XLogRecPtr GetOldestUnsummarizedLSN | ( | TimeLineID * | tli, |
bool * | lsn_is_exact | ||
) |
Definition at line 505 of file walsummarizer.c.
References AmWalSummarizerProcess, WalSummaryFile::end_lsn, ereport, errcode(), errmsg_internal(), ERROR, GetLatestLSN(), GetWalSummaries(), WalSummarizerData::initialized, InvalidXLogRecPtr, lfirst, list_length(), list_nth(), WalSummarizerData::lsn_is_exact, LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), WalSummarizerData::pending_lsn, readTimeLineHistory(), summarize_wal, WalSummarizerData::summarized_lsn, WalSummarizerData::summarized_tli, TimeLineHistoryEntry::tli, wal_segment_size, WalSummarizerCtl, XLogGetOldestSegno(), and XLogSegNoOffsetToRecPtr.
Referenced by KeepLogSeg(), and WalSummarizerMain().
void GetWalSummarizerState | ( | TimeLineID * | summarized_tli, |
XLogRecPtr * | summarized_lsn, | ||
XLogRecPtr * | pending_lsn, | ||
int * | summarizer_pid | ||
) |
Definition at line 447 of file walsummarizer.c.
References GetPGProcByNumber, WalSummarizerData::initialized, INVALID_PROC_NUMBER, InvalidXLogRecPtr, LW_SHARED, LWLockAcquire(), LWLockRelease(), WalSummarizerData::pending_lsn, WalSummarizerData::summarized_lsn, WalSummarizerData::summarized_tli, WalSummarizerData::summarizer_pgprocno, and WalSummarizerCtl.
Referenced by pg_get_wal_summarizer_state().
void SetWalSummarizerLatch | ( | void | ) |
Definition at line 637 of file walsummarizer.c.
References PROC_HDR::allProcs, INVALID_PROC_NUMBER, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), ProcGlobal, PGPROC::procLatch, SetLatch(), WalSummarizerData::summarizer_pgprocno, and WalSummarizerCtl.
Referenced by CreateCheckPoint().
void WaitForWalSummarization | ( | XLogRecPtr | lsn | ) |
Definition at line 660 of file walsummarizer.c.
References CHECK_FOR_INTERRUPTS, ConditionVariableCancelSleep(), ConditionVariableTimedSleep(), ereport, errcode(), errdetail(), errmsg(), errmsg_plural(), ERROR, GetCurrentTimestamp(), InvalidXLogRecPtr, LSN_FORMAT_ARGS, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), WalSummarizerData::pending_lsn, summarize_wal, WalSummarizerData::summarized_lsn, WalSummarizerData::summary_file_cv, TimestampDifferenceMilliseconds(), TimestampTzPlusMilliseconds, WalSummarizerCtl, and WARNING.
Referenced by CleanupAfterArchiveRecovery(), and PrepareForIncrementalBackup().
void WalSummarizerMain | ( | char * | startup_data, |
size_t | startup_data_len | ||
) |
Definition at line 211 of file walsummarizer.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, AtEOXact_Files(), AtEOXact_HashTables(), AuxiliaryProcessMainCommon(), B_WAL_SUMMARIZER, ConditionVariableBroadcast(), ConditionVariableCancelSleep(), context, DEBUG1, EmitErrorReport(), ereport, errmsg_internal(), error_context_stack, FlushErrorState(), GetLatestLSN(), GetOldestUnsummarizedLSN(), HandleWalSummarizerInterrupts(), HOLD_INTERRUPTS, InvalidXLogRecPtr, LSN_FORMAT_ARGS, WalSummarizerData::lsn_is_exact, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), LWLockReleaseAll(), MaybeRemoveOldWalSummaries(), MemoryContextReset(), MemoryContextSwitchTo(), MyBackendType, MyLatch, MyProcNumber, on_shmem_exit(), WalSummarizerData::pending_lsn, PG_exception_stack, pgstat_report_wait_end(), pqsignal(), proc_exit(), procsignal_sigusr1_handler(), readTimeLineHistory(), ReleaseAuxProcessResources(), RESUME_INTERRUPTS, SIG_DFL, SIG_IGN, SIGALRM, SIGCHLD, SIGHUP, SignalHandlerForConfigReload(), SignalHandlerForShutdownRequest(), SIGPIPE, SIGUSR1, SIGUSR2, WalSummarizerData::summarized_lsn, WalSummarizerData::summarized_tli, WalSummarizerData::summarizer_pgprocno, SummarizeWAL(), WalSummarizerData::summary_file_cv, tliSwitchPoint(), TopMemoryContext, UnBlockSig, WaitLatch(), WalSummarizerCtl, WalSummarizerShutdown(), WL_EXIT_ON_PM_DEATH, WL_TIMEOUT, and XLogRecPtrIsInvalid.
void WalSummarizerShmemInit | ( | void | ) |
Definition at line 180 of file walsummarizer.c.
References ConditionVariableInit(), WalSummarizerData::initialized, INVALID_PROC_NUMBER, InvalidXLogRecPtr, WalSummarizerData::lsn_is_exact, WalSummarizerData::pending_lsn, ShmemInitStruct(), WalSummarizerData::summarized_lsn, WalSummarizerData::summarized_tli, WalSummarizerData::summarizer_pgprocno, WalSummarizerData::summary_file_cv, WalSummarizerCtl, and WalSummarizerShmemSize().
Referenced by CreateOrAttachShmemStructs().
Size WalSummarizerShmemSize | ( | void | ) |
Definition at line 171 of file walsummarizer.c.
Referenced by CalculateShmemSize(), and WalSummarizerShmemInit().
|
extern |
Definition at line 142 of file walsummarizer.c.
Referenced by CleanupAfterArchiveRecovery(), GetOldestUnsummarizedLSN(), HandleWalSummarizerInterrupts(), LaunchMissingBackgroundProcesses(), parse_basebackup_options(), PostmasterMain(), and WaitForWalSummarization().
|
extern |
Definition at line 143 of file walsummarizer.c.
Referenced by MaybeRemoveOldWalSummaries().