aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-03-31 14:32:12 -0400
committerRobert Haas <rhaas@postgresql.org>2014-03-31 14:38:18 -0400
commite980ec7c80713e645e08b74e126badb1ca5cecfa (patch)
treeae51b3635dfc3d57c6ca16ff2e3cc38b69815bf4 /src
parent6a63dda4c2a0bf06b8da28d15baae1a08e2e8fd5 (diff)
downloadpostgresql-e980ec7c80713e645e08b74e126badb1ca5cecfa.tar.gz
postgresql-e980ec7c80713e645e08b74e126badb1ca5cecfa.zip
Mark FastPathStrongRelationLocks volatile.
Otherwise, the compiler might decide to move modifications to data within this structure outside the enclosing SpinLockAcquire / SpinLockRelease pair, leading to shared memory corruption. This may or may not explain a recent lmgr-related buildfarm failure on prairiedog, but it needs to be fixed either way.
Diffstat (limited to 'src')
-rw-r--r--src/backend/storage/lmgr/lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index b7a5e457448..3566208904c 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -237,7 +237,7 @@ typedef struct
uint32 count[FAST_PATH_STRONG_LOCK_HASH_PARTITIONS];
} FastPathStrongRelationLockData;
-FastPathStrongRelationLockData *FastPathStrongRelationLocks;
+volatile FastPathStrongRelationLockData *FastPathStrongRelationLocks;
/*