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 | CLOGShmemBuffers (void) |
Size | CLOGShmemSize (void) |
void | CLOGShmemInit (void) |
void | BootStrapCLOG (void) |
void | StartupCLOG (void) |
void | TrimCLOG (void) |
void | ShutdownCLOG (void) |
void | CheckPointCLOG (void) |
void | ExtendCLOG (TransactionId newestXact) |
void | TruncateCLOG (TransactionId oldestXact, Oid oldestxid_datoid) |
void | clog_redo (XLogReaderState *record) |
void | clog_desc (StringInfo buf, XLogReaderState *record) |
const char * | clog_identify (uint8 info) |
#define CLOG_TRUNCATE 0x10 |
Definition at line 55 of file clog.h.
Referenced by clog_desc(), clog_identify(), clog_redo(), and WriteTruncateXlogRec().
#define CLOG_ZEROPAGE 0x00 |
Definition at line 54 of file clog.h.
Referenced by clog_desc(), clog_identify(), clog_redo(), and WriteZeroPageXlogRec().
#define TRANSACTION_STATUS_ABORTED 0x02 |
Definition at line 28 of file clog.h.
Referenced by TransactionIdAbortTree(), TransactionIdDidAbort(), TransactionIdSetPageStatusInternal(), TransactionIdSetTreeStatus(), and TransactionLogFetch().
#define TRANSACTION_STATUS_COMMITTED 0x01 |
Definition at line 27 of file clog.h.
Referenced by TransactionIdAsyncCommitTree(), TransactionIdCommitTree(), TransactionIdDidCommit(), TransactionIdSetPageStatusInternal(), TransactionIdSetStatusBit(), TransactionIdSetTreeStatus(), and TransactionLogFetch().
#define TRANSACTION_STATUS_IN_PROGRESS 0x00 |
Definition at line 26 of file clog.h.
Referenced by InitProcess(), TransactionIdSetStatusBit(), and TransactionLogFetch().
#define TRANSACTION_STATUS_SUB_COMMITTED 0x03 |
Definition at line 29 of file clog.h.
Referenced by TransactionIdDidAbort(), TransactionIdDidCommit(), TransactionIdSetPageStatusInternal(), TransactionIdSetStatusBit(), TransactionIdSetTreeStatus(), and TransactionLogFetch().
void BootStrapCLOG | ( | void | ) |
Definition at line 712 of file clog.c.
References Assert, ClogCtl, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SimpleLruWritePage(), and ZeroCLOGPage().
Referenced by BootStrapXLOG().
void CheckPointCLOG | ( | void | ) |
Definition at line 842 of file clog.c.
References ClogCtl, fsync_fname(), and SimpleLruFlush().
Referenced by CheckPointGuts().
void clog_desc | ( | StringInfo | buf, |
XLogReaderState * | record | ||
) |
Definition at line 21 of file clogdesc.c.
References appendStringInfo(), 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 1003 of file clog.c.
References AdvanceOldestClogXid(), Assert, CLOG_TRUNCATE, CLOG_ZEROPAGE, ClogCtl, elog, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), xl_clog_truncate::oldestXact, xl_clog_truncate::pageno, PANIC, SimpleLruTruncate(), SimpleLruWritePage(), XLogRecGetData, XLogRecGetInfo, XLogRecHasAnyBlockRefs, XLR_INFO_MASK, and ZeroCLOGPage().
Size CLOGShmemBuffers | ( | void | ) |
Definition at line 683 of file clog.c.
References Max, Min, and NBuffers.
Referenced by CLOGShmemInit(), and CLOGShmemSize().
void CLOGShmemInit | ( | void | ) |
Definition at line 698 of file clog.c.
References CLOG_LSNS_PER_PAGE, ClogCtl, CLOGPagePrecedes(), CLOGShmemBuffers(), LWTRANCHE_CLOG_BUFFERS, and SimpleLruInit().
Referenced by CreateSharedMemoryAndSemaphores().
Size CLOGShmemSize | ( | void | ) |
Definition at line 692 of file clog.c.
References CLOG_LSNS_PER_PAGE, CLOGShmemBuffers(), and SimpleLruShmemSize().
Referenced by CreateSharedMemoryAndSemaphores().
void ExtendCLOG | ( | TransactionId | newestXact | ) |
Definition at line 867 of file clog.c.
References FirstNormalTransactionId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), TransactionIdEquals, TransactionIdToPage, TransactionIdToPgIndex, and ZeroCLOGPage().
Referenced by GetNewTransactionId().
void ShutdownCLOG | ( | void | ) |
Definition at line 823 of file clog.c.
References ClogCtl, fsync_fname(), and SimpleLruFlush().
Referenced by ShutdownXLOG().
void StartupCLOG | ( | void | ) |
Definition at line 755 of file clog.c.
References ClogCtl, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), VariableCacheData::nextXid, ShmemVariableCache, and TransactionIdToPage.
Referenced by StartupXLOG().
XidStatus TransactionIdGetStatus | ( | TransactionId | xid, |
XLogRecPtr * | lsn | ||
) |
Definition at line 641 of file clog.c.
References CLOG_BITS_PER_XACT, CLOG_XACT_BITMASK, ClogCtl, GetLSNIndex, LWLockRelease(), SimpleLruReadPage_ReadOnly(), status(), TransactionIdToBIndex, TransactionIdToByte, and TransactionIdToPage.
Referenced by TransactionIdGetCommitLSN(), and TransactionLogFetch().
void TransactionIdSetTreeStatus | ( | TransactionId | xid, |
int | nsubxids, | ||
TransactionId * | subxids, | ||
XidStatus | status, | ||
XLogRecPtr | lsn | ||
) |
Definition at line 163 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 774 of file clog.c.
References CLOG_BITS_PER_XACT, ClogCtl, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MemSet, VariableCacheData::nextXid, ShmemVariableCache, SimpleLruReadPage(), TransactionIdToBIndex, TransactionIdToByte, TransactionIdToPage, and TransactionIdToPgIndex.
Referenced by StartupXLOG().
void TruncateCLOG | ( | TransactionId | oldestXact, |
Oid | oldestxid_datoid | ||
) |
Definition at line 906 of file clog.c.
References AdvanceOldestClogXid(), ClogCtl, SimpleLruTruncate(), SlruScanDirCbReportPresence(), SlruScanDirectory(), TransactionIdToPage, and WriteTruncateXlogRec().
Referenced by vac_truncate_clog().