aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistget.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-05-05 14:43:49 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-05-05 14:43:49 -0400
commit2f4ee3a2f02f612046ecc134ccf50af10240bbb1 (patch)
tree751a2b9da7dc3c9a0b15af06227015f84e594e9d /src/backend/access/gist/gistget.c
parente70980747dbe50b5ddc9aee88912e78825cacdd1 (diff)
downloadpostgresql-2f4ee3a2f02f612046ecc134ccf50af10240bbb1.tar.gz
postgresql-2f4ee3a2f02f612046ecc134ccf50af10240bbb1.zip
Fix possible cache invalidation failure in ReceiveSharedInvalidMessages.
Commit fad153ec45299bd4d4f29dec8d9e04e2f1c08148 modified sinval.c to reduce the number of calls into sinvaladt.c (which require taking a shared lock) by keeping a local buffer of collected-but-not-yet-processed messages. However, if processing of the last message in a batch resulted in a recursive call to ReceiveSharedInvalidMessages, we could overwrite that message with a new one while the outer invalidation function was still working on it. This would be likely to lead to invalidation of the wrong cache entry, allowing subsequent processing to use stale cache data. The fix is just to make a local copy of each message while we're processing it. Spotted by Andres Freund. Back-patch to 8.4 where the bug was introduced.
Diffstat (limited to 'src/backend/access/gist/gistget.c')
0 files changed, 0 insertions, 0 deletions