Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit80647bf

Browse files
committed
Make oldSnapshotControl a pointer to a volatile structure
It was incorrectly declared as a volatile pointer to a non-volatilestructure. Eliminate the OldSnapshotControl struct definition; itis really not needed. Pointed out by Tom Lane.While at it, add OldSnapshotControlData to pgindent's list ofstructures.
1 parentd8ed83c commit80647bf

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

‎src/backend/utils/time/snapmgr.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ typedef struct OldSnapshotControlData
117117
TransactionIdxid_by_minute[FLEXIBLE_ARRAY_MEMBER];
118118
}OldSnapshotControlData;
119119

120-
typedefstructOldSnapshotControlData*OldSnapshotControl;
121-
122-
staticvolatileOldSnapshotControloldSnapshotControl;
120+
staticvolatileOldSnapshotControlData*oldSnapshotControl;
123121

124122

125123
/*
@@ -259,9 +257,9 @@ SnapMgrInit(void)
259257
boolfound;
260258

261259
/*
262-
* Create or attach to theOldSnapshotControl structure.
260+
* Create or attach to theOldSnapshotControlData structure.
263261
*/
264-
oldSnapshotControl= (OldSnapshotControl)
262+
oldSnapshotControl= (volatileOldSnapshotControlData*)
265263
ShmemInitStruct("OldSnapshotControlData",
266264
SnapMgrShmemSize(),&found);
267265

‎src/tools/pgindent/typedefs.list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,7 @@ Oid
11751175
OidOptions
11761176
OkeysState
11771177
OldSerXidControl
1178+
OldSnapshotControlData
11781179
OldToNewMapping
11791180
OldToNewMappingData
11801181
OldTriggerInfo

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp