|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Data Structures | |
| struct | xl_clog_truncate |
Macros | |
| #define | TRANSACTION_STATUS_IN_PROGRESS 0x00 |
| #define | TRANSACTION_STATUS_COMMITTED 0x01 |
| #define | TRANSACTION_STATUS_ABORTED 0x02 |
| #define | TRANSACTION_STATUS_SUB_COMMITTED 0x03 |
| #define | CLOG_ZEROPAGE 0x00 |
| #define | CLOG_TRUNCATE 0x10 |
Typedefs | |
| typedef int | XidStatus |
| typedef struct xl_clog_truncate | xl_clog_truncate |
Functions | |
| void | TransactionIdSetTreeStatus (TransactionId xid, int nsubxids, TransactionId *subxids, XidStatus status, XLogRecPtr lsn) |
| XidStatus | TransactionIdGetStatus (TransactionId xid, XLogRecPtr *lsn) |
| Size | CLOGShmemSize (void) |
| void | CLOGShmemInit (void) |
| void | BootStrapCLOG (void) |
| void | StartupCLOG (void) |
| void | TrimCLOG (void) |
| void | CheckPointCLOG (void) |
| void | ExtendCLOG (TransactionId newestXact) |
| void | TruncateCLOG (TransactionId oldestXact, Oid oldestxid_datoid) |
| int | clogsyncfiletag (const FileTag *ftag, char *path) |
| void | clog_redo (XLogReaderState *record) |
| void | clog_desc (StringInfo buf, XLogReaderState *record) |
| const char * | clog_identify (uint8 info) |
| typedef struct xl_clog_truncate xl_clog_truncate |
| void BootStrapCLOG | ( | void | ) |
Definition at line 832 of file clog.c.
References SimpleLruZeroAndWritePage(), and XactCtl.
Referenced by BootStrapXLOG().
| void CheckPointCLOG | ( | void | ) |
Definition at line 903 of file clog.c.
References SimpleLruWriteAll(), and XactCtl.
Referenced by CheckPointGuts().
| void clog_desc | ( | StringInfo | buf, |
| XLogReaderState * | record | ||
| ) |
Definition at line 21 of file clogdesc.c.
References appendStringInfo(), buf, CLOG_TRUNCATE, CLOG_ZEROPAGE, xl_clog_truncate::oldestXact, xl_clog_truncate::pageno, XLogRecGetData, and XLogRecGetInfo.
| const char * clog_identify | ( | uint8 | info | ) |
Definition at line 44 of file clogdesc.c.
References CLOG_TRUNCATE, CLOG_ZEROPAGE, and XLR_INFO_MASK.
| void clog_redo | ( | XLogReaderState * | record | ) |
Definition at line 1063 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.
| void CLOGShmemInit | ( | void | ) |
Definition at line 786 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().
| Size CLOGShmemSize | ( | void | ) |
Definition at line 780 of file clog.c.
References CLOG_LSNS_PER_PAGE, CLOGShmemBuffers(), and SimpleLruShmemSize().
Referenced by CalculateShmemSize().
| int clogsyncfiletag | ( | const FileTag * | ftag, |
| char * | path | ||
| ) |
Definition at line 1095 of file clog.c.
References SlruSyncFileTag(), and XactCtl.
| void ExtendCLOG | ( | TransactionId | newestXact | ) |
Definition at line 925 of file clog.c.
References CLOG_ZEROPAGE, FirstNormalTransactionId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SimpleLruGetBankLock(), SimpleLruZeroPage(), TransactionIdEquals, TransactionIdToPage(), TransactionIdToPgIndex, XactCtl, and XLogSimpleInsertInt64().
Referenced by GetNewTransactionId().
| void StartupCLOG | ( | void | ) |
Definition at line 843 of file clog.c.
References TransamVariablesData::nextXid, pg_atomic_write_u64(), TransactionIdToPage(), TransamVariables, XactCtl, and XidFromFullTransactionId.
Referenced by StartupXLOG().
| XidStatus TransactionIdGetStatus | ( | TransactionId | xid, |
| XLogRecPtr * | lsn | ||
| ) |
Definition at line 734 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().
| void TransactionIdSetTreeStatus | ( | TransactionId | xid, |
| int | nsubxids, | ||
| TransactionId * | subxids, | ||
| XidStatus | status, | ||
| XLogRecPtr | lsn | ||
| ) |
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().
| void TrimCLOG | ( | void | ) |
Definition at line 858 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().
| void TruncateCLOG | ( | TransactionId | oldestXact, |
| Oid | oldestxid_datoid | ||
| ) |
Definition at line 967 of file clog.c.
References AdvanceOldestClogXid(), SimpleLruTruncate(), SlruScanDirCbReportPresence(), SlruScanDirectory(), TransactionIdToPage(), WriteTruncateXlogRec(), and XactCtl.
Referenced by vac_truncate_clog().