1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-21 02:52:47 +03:00

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
This commit is contained in:
Heikki Linnakangas
2023-12-08 09:47:15 +02:00
parent 15916ffb04
commit b31ba5310b
18 changed files with 172 additions and 175 deletions

View File

@@ -197,7 +197,7 @@ FullTransactionIdAdvance(FullTransactionId *dest)
#define FirstNormalObjectId 16384
/*
* VariableCache is a data structure in shared memory that is used to track
* TransamVariables is a data structure in shared memory that is used to track
* OID and XID assignment state. For largely historical reasons, there is
* just one struct with different fields that are protected by different
* LWLocks.
@@ -206,7 +206,7 @@ FullTransactionIdAdvance(FullTransactionId *dest)
* used just to generate useful messages when xidWarnLimit or xidStopLimit
* are exceeded.
*/
typedef struct VariableCacheData
typedef struct TransamVariablesData
{
/*
* These fields are protected by OidGenLock.
@@ -252,9 +252,7 @@ typedef struct VariableCacheData
*/
TransactionId oldestClogXid; /* oldest it's safe to look up in clog */
} VariableCacheData;
typedef VariableCacheData *VariableCache;
} TransamVariablesData;
/* ----------------
@@ -266,7 +264,7 @@ typedef VariableCacheData *VariableCache;
extern bool TransactionStartedDuringRecovery(void);
/* in transam/varsup.c */
extern PGDLLIMPORT VariableCache ShmemVariableCache;
extern PGDLLIMPORT TransamVariablesData *TransamVariables;
/*
* prototypes for functions in transam/transam.c