|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/slru.h"#include "access/subtrans.h"#include "access/transam.h"#include "miscadmin.h"#include "pg_trace.h"#include "storage/subsystems.h"#include "utils/guc_hooks.h"#include "utils/snapmgr.h"
Go to the source code of this file.
Macros | |
| #define | SUBTRANS_XACTS_PER_PAGE (BLCKSZ / sizeof(TransactionId)) |
| #define | TransactionIdToEntry(xid) ((xid) % (TransactionId) SUBTRANS_XACTS_PER_PAGE) |
| #define | SubTransCtl (&SubTransSlruDesc) |
Variables | |
| const ShmemCallbacks | SUBTRANSShmemCallbacks |
| static SlruDesc | SubTransSlruDesc |
| #define SUBTRANS_XACTS_PER_PAGE (BLCKSZ / sizeof(TransactionId)) |
Definition at line 55 of file subtrans.c.
| #define SubTransCtl (&SubTransSlruDesc) |
Definition at line 85 of file subtrans.c.
| #define TransactionIdToEntry | ( | xid | ) | ((xid) % (TransactionId) SUBTRANS_XACTS_PER_PAGE) |
Definition at line 67 of file subtrans.c.
Definition at line 288 of file subtrans.c.
References SimpleLruZeroAndWritePage(), and SubTransCtl.
Referenced by BootStrapXLOG().
Definition at line 272 of file subtrans.c.
References check_slru_buffers(), and newval.
Definition at line 348 of file subtrans.c.
References fb(), SimpleLruWriteAll(), and SubTransCtl.
Referenced by CheckPointGuts().
| void ExtendSUBTRANS | ( | TransactionId | newestXact | ) |
Definition at line 372 of file subtrans.c.
References fb(), FirstNormalTransactionId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SimpleLruGetBankLock(), SimpleLruZeroPage(), SubTransCtl, TransactionIdEquals, TransactionIdToEntry, and TransactionIdToPage().
Referenced by GetNewTransactionId(), ProcArrayApplyRecoveryInfo(), and RecordKnownAssignedTransactionIds().
| void StartupSUBTRANS | ( | TransactionId | oldestActiveXID | ) |
Definition at line 302 of file subtrans.c.
References fb(), LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MaxTransactionId, TransamVariablesData::nextXid, SimpleLruGetBankLock(), SimpleLruZeroPage(), SubTransCtl, TransactionIdToPage(), TransamVariables, and XidFromFullTransactionId.
Referenced by StartupXLOG().
Definition at line 443 of file subtrans.c.
References errdetail(), and fb().
Referenced by SUBTRANSShmemRequest().
| TransactionId SubTransGetParent | ( | TransactionId | xid | ) |
Definition at line 129 of file subtrans.c.
References Assert, fb(), InvalidTransactionId, LWLockRelease(), SimpleLruGetBankLock(), SimpleLruReadPage_ReadOnly(), SubTransCtl, TransactionIdFollowsOrEquals(), TransactionIdIsNormal, TransactionIdToEntry, TransactionIdToPage(), and TransactionXmin.
Referenced by SubTransGetTopmostTransaction(), TransactionIdDidAbort(), and TransactionIdDidCommit().
| TransactionId SubTransGetTopmostTransaction | ( | TransactionId | xid | ) |
Definition at line 170 of file subtrans.c.
References Assert, elog, ERROR, fb(), SubTransGetParent(), TransactionIdFollowsOrEquals(), TransactionIdIsValid, TransactionIdPrecedes(), and TransactionXmin.
Referenced by ConditionalXactLockTableWait(), HeapCheckForSerializableConflictOut(), TransactionIdIsInProgress(), XactLockTableWait(), and XidInMVCCSnapshot().
Definition at line 428 of file subtrans.c.
References fb(), FirstNormalTransactionId, SUBTRANS_XACTS_PER_PAGE, and TransactionIdPrecedes().
Referenced by SUBTRANSShmemRequest().
| void SubTransSetParent | ( | TransactionId | xid, |
| TransactionId | parent | ||
| ) |
Definition at line 92 of file subtrans.c.
References Assert, fb(), InvalidTransactionId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SimpleLruGetBankLock(), SimpleLruReadPage(), SubTransCtl, TransactionIdFollows(), TransactionIdIsValid, TransactionIdToEntry, and TransactionIdToPage().
Referenced by AssignTransactionId(), ProcArrayApplyXidAssignment(), and ProcessTwoPhaseBuffer().
Definition at line 208 of file subtrans.c.
References Max, Min, SimpleLruAutotuneBuffers(), SLRU_MAX_ALLOWED_BUFFERS, and subtransaction_buffers.
Referenced by SUBTRANSShmemRequest().
Definition at line 263 of file subtrans.c.
References SlruPagePrecedesUnitTests, SUBTRANS_XACTS_PER_PAGE, and SubTransCtl.
Definition at line 223 of file subtrans.c.
References Assert, buf, fb(), name, PGC_POSTMASTER, PGC_S_DYNAMIC_DEFAULT, PGC_S_OVERRIDE, SetConfigOption(), SimpleLruRequest, snprintf, subtrans_errdetail_for_io_error(), subtransaction_buffers, SubTransPagePrecedes(), SUBTRANSShmemBuffers(), SubTransSlruDesc, and SYNC_HANDLER_NONE.
|
inlinestatic |
Definition at line 62 of file subtrans.c.
References SUBTRANS_XACTS_PER_PAGE.
Referenced by ExtendSUBTRANS(), StartupSUBTRANS(), SubTransGetParent(), SubTransSetParent(), and TruncateSUBTRANS().
| void TruncateSUBTRANS | ( | TransactionId | oldestXact | ) |
Definition at line 404 of file subtrans.c.
References fb(), SimpleLruTruncate(), SubTransCtl, TransactionIdRetreat, and TransactionIdToPage().
Referenced by CreateCheckPoint(), and CreateRestartPoint().
| const ShmemCallbacks SUBTRANSShmemCallbacks |
Definition at line 75 of file subtrans.c.
|
static |
Definition at line 83 of file subtrans.c.
Referenced by SUBTRANSShmemRequest().