aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/spgist/spgxlog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-09-03 15:38:42 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-09-03 15:39:15 -0400
commit2a2352e07df9ccc70689061b6453e226a56e7c79 (patch)
treef5c2a3f5b299500d2d8538f7ddcff7b98b2381f1 /src/backend/access/spgist/spgxlog.c
parent6259678f8f5443e9d396e20418448b247c6948dd (diff)
downloadpostgresql-2a2352e07df9ccc70689061b6453e226a56e7c79.tar.gz
postgresql-2a2352e07df9ccc70689061b6453e226a56e7c79.zip
Replace memcpy() calls in xlog.c critical sections with struct assignments.
This gets rid of a dangerous-looking use of the not-volatile XLogCtl pointer in a couple of spinlock-protected sections, where the normal coding rule is that you should only access shared memory through a pointer-to-volatile. I think the risk is only hypothetical not actual, since for there to be a bug the compiler would have to move the spinlock acquire or release across the memcpy() call, which one sincerely hopes it will not. Still, it looks cleaner this way. Per comment from Daniel Farina and subsequent discussion.
Diffstat (limited to 'src/backend/access/spgist/spgxlog.c')
0 files changed, 0 insertions, 0 deletions