summaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorTom Lane2014-05-05 18:43:52 +0000
committerTom Lane2014-05-05 18:43:52 +0000
commit7d5b6862180b3e2ef4c34d5f0d397ae5825acd71 (patch)
tree57dc9166971fa07e58898b61956b3535937a244e /src/backend/parser
parent9174c77f86755494d1b3845fffb7f30db0ba2ec1 (diff)
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/parser')
0 files changed, 0 insertions, 0 deletions