#include "postgres.h"
#include "access/clog.h"
#include "access/slru.h"
#include "access/transam.h"
#include "access/xlog.h"
#include "access/xloginsert.h"
#include "access/xlogutils.h"
#include "miscadmin.h"
#include "pg_trace.h"
#include "pgstat.h"
#include "storage/proc.h"
#include "storage/sync.h"
#include "utils/guc_hooks.h"
Go to the source code of this file.
Definition at line 831 of file clog.c.
References SimpleLruZeroAndWritePage(), and XactCtl.
Referenced by BootStrapXLOG().
Definition at line 819 of file clog.c.
References check_slru_buffers(), and newval.
Definition at line 902 of file clog.c.
References SimpleLruWriteAll(), and XactCtl.
Referenced by CheckPointGuts().
Definition at line 1062 of file clog.c.
References AdvanceOldestClogXid(), Assert(), CLOG_TRUNCATE, CLOG_ZEROPAGE, elog, xl_clog_truncate::oldestXact, xl_clog_truncate::pageno, PANIC, SimpleLruTruncate(), SimpleLruZeroAndWritePage(), XactCtl, XLogRecGetData, XLogRecGetInfo, and XLogRecHasAnyBlockRefs.
Definition at line 1021 of file clog.c.
References CLOG_XACTS_PER_PAGE, FirstNormalTransactionId, and TransactionIdPrecedes().
Referenced by CLOGShmemInit().
Definition at line 766 of file clog.c.
References CLOG_MAX_ALLOWED_BUFFERS, Max, Min, SimpleLruAutotuneBuffers(), and transaction_buffers.
Referenced by CLOGShmemInit(), and CLOGShmemSize().
Definition at line 785 of file clog.c.
References Assert(), buf, CLOG_LSNS_PER_PAGE, CLOG_XACTS_PER_PAGE, CLOGPagePrecedes(), CLOGShmemBuffers(), PGC_POSTMASTER, PGC_S_DYNAMIC_DEFAULT, PGC_S_OVERRIDE, SetConfigOption(), SimpleLruInit(), SlruPagePrecedesUnitTests, snprintf, SYNC_HANDLER_CLOG, transaction_buffers, and XactCtl.
Referenced by CreateOrAttachShmemStructs().
Definition at line 779 of file clog.c.
References CLOG_LSNS_PER_PAGE, CLOGShmemBuffers(), and SimpleLruShmemSize().
Referenced by CalculateShmemSize().
Definition at line 1094 of file clog.c.
References SlruSyncFileTag(), and XactCtl.
Definition at line 924 of file clog.c.
References CLOG_ZEROPAGE, FirstNormalTransactionId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SimpleLruGetBankLock(), SimpleLruZeroPage(), TransactionIdEquals, TransactionIdToPage(), TransactionIdToPgIndex, XactCtl, and XLogSimpleInsertInt64().
Referenced by GetNewTransactionId().
Definition at line 255 of file clog.c.
References Assert(), i, InvalidTransactionId, TransactionIdSetPageStatus(), and TransactionIdToPage().
Referenced by TransactionIdSetTreeStatus().
Definition at line 842 of file clog.c.
References TransamVariablesData::nextXid, pg_atomic_write_u64(), TransactionIdToPage(), TransamVariables, XactCtl, and XidFromFullTransactionId.
Referenced by StartupXLOG().
Definition at line 439 of file clog.c.
References PROC_HDR::allProcs, Assert(), PROC_HDR::clogGroupFirst, PGPROC::clogGroupMember, PGPROC::clogGroupMemberLsn, PGPROC::clogGroupMemberPage, PGPROC::clogGroupMemberXid, PGPROC::clogGroupMemberXidStatus, PGPROC::clogGroupNext, XidCacheStatus::count, GetPGProcByNumber, INVALID_PROC_NUMBER, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MyProc, MyProcNumber, pg_atomic_compare_exchange_u32(), pg_atomic_exchange_u32(), pg_atomic_read_u32(), pg_atomic_write_u32(), pg_write_barrier, PGSemaphoreLock(), PGSemaphoreUnlock(), pgstat_report_wait_end(), pgstat_report_wait_start(), ProcGlobal, PGPROC::sem, SimpleLruGetBankLock(), PGPROC::subxids, PGPROC::subxidStatus, THRESHOLD_SUBTRANS_CLOG_OPT, TransactionIdIsValid, TransactionIdSetPageStatusInternal(), XactCtl, and XidCache::xids.
Referenced by TransactionIdSetPageStatus().
Definition at line 733 of file clog.c.
References CLOG_BITS_PER_XACT, CLOG_XACT_BITMASK, GetLSNIndex, LWLockRelease(), SimpleLruGetBankLock(), SimpleLruReadPage_ReadOnly(), TransactionIdToBIndex, TransactionIdToByte, TransactionIdToPage(), and XactCtl.
Referenced by TransactionIdGetCommitLSN(), and TransactionLogFetch().
Definition at line 291 of file clog.c.
References XidCacheStatus::count, LW_EXCLUSIVE, LWLockAcquire(), LWLockConditionalAcquire(), LWLockRelease(), MyProc, PGPROC_MAX_CACHED_SUBXIDS, SimpleLruGetBankLock(), StaticAssertDecl, PGPROC::subxids, PGPROC::subxidStatus, THRESHOLD_SUBTRANS_CLOG_OPT, TransactionGroupUpdateXidStatus(), TransactionIdSetPageStatusInternal(), XactCtl, PGPROC::xid, and XidCache::xids.
Referenced by set_status_by_pages(), and TransactionIdSetTreeStatus().
Definition at line 362 of file clog.c.
References Assert(), i, LW_EXCLUSIVE, LWLockHeldByMeInMode(), SimpleLruGetBankLock(), SimpleLruReadPage(), TRANSACTION_STATUS_ABORTED, TRANSACTION_STATUS_COMMITTED, TRANSACTION_STATUS_SUB_COMMITTED, TransactionIdIsValid, TransactionIdSetStatusBit(), TransactionIdToPage(), XactCtl, and XLogRecPtrIsInvalid.
Referenced by TransactionGroupUpdateXidStatus(), and TransactionIdSetPageStatus().
Definition at line 659 of file clog.c.
References Assert(), CLOG_BITS_PER_XACT, CLOG_XACT_BITMASK, GetLSNIndex, InRecovery, LW_EXCLUSIVE, LWLockHeldByMeInMode(), SimpleLruGetBankLock(), TRANSACTION_STATUS_COMMITTED, TRANSACTION_STATUS_IN_PROGRESS, TRANSACTION_STATUS_SUB_COMMITTED, TransactionIdToBIndex, TransactionIdToByte, TransactionIdToPage(), XactCtl, and XLogRecPtrIsInvalid.
Referenced by TransactionIdSetPageStatusInternal().
Definition at line 181 of file clog.c.
References Assert(), i, set_status_by_pages(), TRANSACTION_STATUS_ABORTED, TRANSACTION_STATUS_COMMITTED, TRANSACTION_STATUS_SUB_COMMITTED, TransactionIdSetPageStatus(), and TransactionIdToPage().
Referenced by TransactionIdAbortTree(), TransactionIdAsyncCommitTree(), and TransactionIdCommitTree().
Definition at line 82 of file clog.c.
References CLOG_XACTS_PER_PAGE.
Referenced by ExtendCLOG(), set_status_by_pages(), StartupCLOG(), TransactionIdGetStatus(), TransactionIdSetPageStatusInternal(), TransactionIdSetStatusBit(), TransactionIdSetTreeStatus(), TrimCLOG(), and TruncateCLOG().
Definition at line 857 of file clog.c.
References CLOG_BITS_PER_XACT, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MemSet, TransamVariablesData::nextXid, SimpleLruGetBankLock(), SimpleLruReadPage(), TransactionIdToBIndex, TransactionIdToByte, TransactionIdToPage(), TransactionIdToPgIndex, TransamVariables, XactCtl, and XidFromFullTransactionId.
Referenced by StartupXLOG().
Definition at line 966 of file clog.c.
References AdvanceOldestClogXid(), SimpleLruTruncate(), SlruScanDirCbReportPresence(), SlruScanDirectory(), TransactionIdToPage(), WriteTruncateXlogRec(), and XactCtl.
Referenced by vac_truncate_clog().
Definition at line 1043 of file clog.c.
References CLOG_TRUNCATE, xl_clog_truncate::oldestXact, xl_clog_truncate::oldestXactDb, xl_clog_truncate::pageno, XLogBeginInsert(), XLogFlush(), XLogInsert(), and XLogRegisterData().
Referenced by TruncateCLOG().