54 #define SUBTRANS_XACTS_PER_PAGE (BLCKSZ / sizeof(TransactionId))
66 #define TransactionIdToEntry(xid) ((xid) % (TransactionId) SUBTRANS_XACTS_PER_PAGE)
74 #define SubTransCtl (&SubTransCtlData)
173 previousXid = parentXid;
184 elog(
ERROR,
"pg_subtrans contains invalid entry: xid %u points to parent xid %u",
185 previousXid, parentXid);
330 if (prevlock != lock)
339 if (startPage == endPage)
364 TRACE_POSTGRESQL_SUBTRANS_CHECKPOINT_START(
true);
366 TRACE_POSTGRESQL_SUBTRANS_CHECKPOINT_DONE(
true);
#define Assert(condition)
int subtransaction_buffers
void SetConfigOption(const char *name, const char *value, GucContext context, GucSource source)
if(TABLE==NULL||TABLE_index==NULL)
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
void LWLockRelease(LWLock *lock)
@ LWTRANCHE_SUBTRANS_BUFFER
@ LWTRANCHE_SUBTRANS_SLRU
static rewind_source * source
void SimpleLruInit(SlruCtl ctl, const char *name, int nslots, int nlsns, const char *subdir, int buffer_tranche_id, int bank_tranche_id, SyncRequestHandler sync_handler, bool long_segment_names)
int SimpleLruReadPage_ReadOnly(SlruCtl ctl, int64 pageno, TransactionId xid)
void SimpleLruWritePage(SlruCtl ctl, int slotno)
void SimpleLruWriteAll(SlruCtl ctl, bool allow_redirtied)
int SimpleLruAutotuneBuffers(int divisor, int max)
int SimpleLruReadPage(SlruCtl ctl, int64 pageno, bool write_ok, TransactionId xid)
int SimpleLruZeroPage(SlruCtl ctl, int64 pageno)
void SimpleLruTruncate(SlruCtl ctl, int64 cutoffPage)
Size SimpleLruShmemSize(int nslots, int nlsns)
bool check_slru_buffers(const char *name, int *newval)
static LWLock * SimpleLruGetBankLock(SlruCtl ctl, int64 pageno)
#define SlruPagePrecedesUnitTests(ctl, per_page)
#define SLRU_MAX_ALLOWED_BUFFERS
TransactionId TransactionXmin
FullTransactionId nextXid
bool check_subtrans_buffers(int *newval, void **extra, GucSource source)
void SUBTRANSShmemInit(void)
void SubTransSetParent(TransactionId xid, TransactionId parent)
TransactionId SubTransGetTopmostTransaction(TransactionId xid)
#define SUBTRANS_XACTS_PER_PAGE
#define TransactionIdToEntry(xid)
static SlruCtlData SubTransCtlData
void ExtendSUBTRANS(TransactionId newestXact)
void StartupSUBTRANS(TransactionId oldestActiveXID)
void CheckPointSUBTRANS(void)
Size SUBTRANSShmemSize(void)
static int SUBTRANSShmemBuffers(void)
TransactionId SubTransGetParent(TransactionId xid)
static bool SubTransPagePrecedes(int64 page1, int64 page2)
static int64 TransactionIdToPage(TransactionId xid)
static int ZeroSUBTRANSPage(int64 pageno)
void BootStrapSUBTRANS(void)
void TruncateSUBTRANS(TransactionId oldestXact)
bool TransactionIdPrecedes(TransactionId id1, TransactionId id2)
bool TransactionIdFollows(TransactionId id1, TransactionId id2)
bool TransactionIdFollowsOrEquals(TransactionId id1, TransactionId id2)
#define TransactionIdRetreat(dest)
#define InvalidTransactionId
#define TransactionIdEquals(id1, id2)
#define XidFromFullTransactionId(x)
#define FirstNormalTransactionId
#define TransactionIdIsValid(xid)
#define TransactionIdIsNormal(xid)
TransamVariablesData * TransamVariables