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 833 of file clog.c.
References Assert, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SimpleLruGetBankLock(), SimpleLruWritePage(), XactCtl, and ZeroCLOGPage().
Referenced by BootStrapXLOG().
void CheckPointCLOG | ( | void | ) |
Definition at line 937 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, XLogRecGetInfo, and XLR_INFO_MASK.
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 1107 of file clog.c.
References AdvanceOldestClogXid(), Assert, CLOG_TRUNCATE, CLOG_ZEROPAGE, elog, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), xl_clog_truncate::oldestXact, xl_clog_truncate::pageno, PANIC, SimpleLruGetBankLock(), SimpleLruTruncate(), SimpleLruWritePage(), XactCtl, XLogRecGetData, XLogRecGetInfo, XLogRecHasAnyBlockRefs, XLR_INFO_MASK, and ZeroCLOGPage().
void CLOGShmemInit | ( | void | ) |
Definition at line 787 of file clog.c.
References Assert, buf, CLOG_LSNS_PER_PAGE, CLOG_XACTS_PER_PAGE, CLOGPagePrecedes(), CLOGShmemBuffers(), LWTRANCHE_XACT_BUFFER, LWTRANCHE_XACT_SLRU, 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 781 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 1149 of file clog.c.
References SlruSyncFileTag(), and XactCtl.
void ExtendCLOG | ( | TransactionId | newestXact | ) |
Definition at line 959 of file clog.c.
References FirstNormalTransactionId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SimpleLruGetBankLock(), TransactionIdEquals, TransactionIdToPage(), TransactionIdToPgIndex, XactCtl, and ZeroCLOGPage().
Referenced by GetNewTransactionId().
void StartupCLOG | ( | void | ) |
Definition at line 877 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 735 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 183 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 892 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 1000 of file clog.c.
References AdvanceOldestClogXid(), SimpleLruTruncate(), SlruScanDirCbReportPresence(), SlruScanDirectory(), TransactionIdToPage(), WriteTruncateXlogRec(), and XactCtl.
Referenced by vac_truncate_clog().