Commit 80647bf6 authored by Kevin Grittner's avatar Kevin Grittner

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.
parent d8ed83cd
...@@ -117,9 +117,7 @@ typedef struct OldSnapshotControlData ...@@ -117,9 +117,7 @@ typedef struct OldSnapshotControlData
TransactionId xid_by_minute[FLEXIBLE_ARRAY_MEMBER]; TransactionId xid_by_minute[FLEXIBLE_ARRAY_MEMBER];
} OldSnapshotControlData; } OldSnapshotControlData;
typedef struct OldSnapshotControlData *OldSnapshotControl; static volatile OldSnapshotControlData *oldSnapshotControl;
static volatile OldSnapshotControl oldSnapshotControl;
/* /*
...@@ -259,9 +257,9 @@ SnapMgrInit(void) ...@@ -259,9 +257,9 @@ SnapMgrInit(void)
bool found; bool found;
/* /*
* Create or attach to the OldSnapshotControl structure. * Create or attach to the OldSnapshotControlData structure.
*/ */
oldSnapshotControl = (OldSnapshotControl) oldSnapshotControl = (volatile OldSnapshotControlData *)
ShmemInitStruct("OldSnapshotControlData", ShmemInitStruct("OldSnapshotControlData",
SnapMgrShmemSize(), &found); SnapMgrShmemSize(), &found);
......
...@@ -1175,6 +1175,7 @@ Oid ...@@ -1175,6 +1175,7 @@ Oid
OidOptions OidOptions
OkeysState OkeysState
OldSerXidControl OldSerXidControl
OldSnapshotControlData
OldToNewMapping OldToNewMapping
OldToNewMappingData OldToNewMappingData
OldTriggerInfo OldTriggerInfo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment