diff options
| author | Heikki Linnakangas | 2023-12-08 07:47:15 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2023-12-08 07:47:15 +0000 |
| commit | b31ba5310b5176402b60abc0454a033b1210ab75 (patch) | |
| tree | 664161b9838a21c86e2402dc48f73d1336936270 /contrib/amcheck | |
| parent | 15916ffb0468d0b1036ba661767fe6e1b5fb3ee8 (diff) | |
Rename ShmemVariableCache to TransamVariables
The old name was misleading: It's not a cache, the values kept in the
struct are the authoritative source.
Reviewed-by: Tristan Partin, Richard Guo
Discussion: https://www.postgresql.org/message-id/6537d63d-4bb5-46f8-9b5d-73a8ba4720ab@iki.fi
Diffstat (limited to 'contrib/amcheck')
| -rw-r--r-- | contrib/amcheck/verify_heapam.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c index 78eed49b1ba..2ed66683ed1 100644 --- a/contrib/amcheck/verify_heapam.c +++ b/contrib/amcheck/verify_heapam.c @@ -81,12 +81,12 @@ typedef struct ToastedAttribute typedef struct HeapCheckContext { /* - * Cached copies of values from ShmemVariableCache and computed values - * from them. + * Cached copies of values from TransamVariables and computed values from + * them. */ - FullTransactionId next_fxid; /* ShmemVariableCache->nextXid */ + FullTransactionId next_fxid; /* TransamVariables->nextXid */ TransactionId next_xid; /* 32-bit version of next_fxid */ - TransactionId oldest_xid; /* ShmemVariableCache->oldestXid */ + TransactionId oldest_xid; /* TransamVariables->oldestXid */ FullTransactionId oldest_fxid; /* 64-bit version of oldest_xid, computed * relative to next_fxid */ TransactionId safe_xmin; /* this XID and newer ones can't become @@ -1924,8 +1924,8 @@ update_cached_xid_range(HeapCheckContext *ctx) { /* Make cached copies */ LWLockAcquire(XidGenLock, LW_SHARED); - ctx->next_fxid = ShmemVariableCache->nextXid; - ctx->oldest_xid = ShmemVariableCache->oldestXid; + ctx->next_fxid = TransamVariables->nextXid; + ctx->oldest_xid = TransamVariables->oldestXid; LWLockRelease(XidGenLock); /* And compute alternate versions of the same */ @@ -2062,7 +2062,7 @@ get_xid_status(TransactionId xid, HeapCheckContext *ctx, *status = XID_COMMITTED; LWLockAcquire(XactTruncationLock, LW_SHARED); clog_horizon = - FullTransactionIdFromXidAndCtx(ShmemVariableCache->oldestClogXid, + FullTransactionIdFromXidAndCtx(TransamVariables->oldestClogXid, ctx); if (FullTransactionIdPrecedesOrEquals(clog_horizon, fxid)) { |
