mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Make oldSnapshotControl a pointer to a volatile structure
It was incorrectly declared as a volatile pointer to a non-volatile structure. Eliminate the OldSnapshotControl struct definition; it is really not needed. Pointed out by Tom Lane. While at it, add OldSnapshotControlData to pgindent's list of structures.
This commit is contained in:
parent
d8ed83cd7f
commit
80647bf65a
@ -117,9 +117,7 @@ typedef struct OldSnapshotControlData
|
||||
TransactionId xid_by_minute[FLEXIBLE_ARRAY_MEMBER];
|
||||
} OldSnapshotControlData;
|
||||
|
||||
typedef struct OldSnapshotControlData *OldSnapshotControl;
|
||||
|
||||
static volatile OldSnapshotControl oldSnapshotControl;
|
||||
static volatile OldSnapshotControlData *oldSnapshotControl;
|
||||
|
||||
|
||||
/*
|
||||
@ -259,9 +257,9 @@ SnapMgrInit(void)
|
||||
bool found;
|
||||
|
||||
/*
|
||||
* Create or attach to the OldSnapshotControl structure.
|
||||
* Create or attach to the OldSnapshotControlData structure.
|
||||
*/
|
||||
oldSnapshotControl = (OldSnapshotControl)
|
||||
oldSnapshotControl = (volatile OldSnapshotControlData *)
|
||||
ShmemInitStruct("OldSnapshotControlData",
|
||||
SnapMgrShmemSize(), &found);
|
||||
|
||||
|
@ -1175,6 +1175,7 @@ Oid
|
||||
OidOptions
|
||||
OkeysState
|
||||
OldSerXidControl
|
||||
OldSnapshotControlData
|
||||
OldToNewMapping
|
||||
OldToNewMappingData
|
||||
OldTriggerInfo
|
||||
|
Loading…
x
Reference in New Issue
Block a user