aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2020-03-28 11:52:11 -0700
committerAndres Freund <andres@anarazel.de>2020-03-28 12:04:49 -0700
commit00a0a428ef503d50b74b8a08d6365a4a0ce04c14 (patch)
tree97d5a58948de84ee52e06d27d500bbc2f8bfb99e /src/tutorial/basics.source
parentdeeda011b316c5c27e4f1c926050a81ffe86c9ef (diff)
downloadpostgresql-00a0a428ef503d50b74b8a08d6365a4a0ce04c14.tar.gz
postgresql-00a0a428ef503d50b74b8a08d6365a4a0ce04c14.zip
Ensure snapshot is registered within ScanPgRelation().
In 9.4 I added support to use a historical snapshot in ScanPgRelation(), while adding logical decoding. Unfortunately a conflict with the concurrent removal of SnapshotNow was incorrectly resolved, leading to an unregistered snapshot being used. It is not correct to use an unregistered (or non-active) snapshot for anything non-trivial, because catalog invalidations can cause the snapshot to be invalidated. Luckily it seems unlikely to actively cause problems in practice, as ScanPgRelation() requires that we already have a lock on the relation, we only look for a single row, and we don't appear to rely on the result's tid to be correct. It however is clearly wrong and potential negative consequences would likely be hard to find. So it seems worth backpatching the fix, even without a concrete hazard. Discussion: https://postgr.es/m/20200229052459.wzhqnbhrriezg4v2@alap3.anarazel.de Backpatch: 9.5-
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions