pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Ensure snapshot is registered within ScanPgRelation(). 6+ messages / 1 participants [nested] [flat]
* pgsql: Ensure snapshot is registered within ScanPgRelation(). @ 2020-03-28 19:29 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2020-03-28 19:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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- Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/42750b08d946e2a5048454d7b4e127f0e1df3c65 Modified Files -------------- src/backend/utils/cache/relcache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Ensure snapshot is registered within ScanPgRelation(). @ 2020-03-28 19:29 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2020-03-28 19:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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- Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1d377f203ea47483d48b041c32986dda2f672205 Modified Files -------------- src/backend/utils/cache/relcache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Ensure snapshot is registered within ScanPgRelation(). @ 2020-03-28 19:29 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2020-03-28 19:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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- Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/00a0a428ef503d50b74b8a08d6365a4a0ce04c14 Modified Files -------------- src/backend/utils/cache/relcache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Ensure snapshot is registered within ScanPgRelation(). @ 2020-03-28 19:29 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2020-03-28 19:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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- Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a0e2a178c6409db195e8e902e4ac279ad60777cb Modified Files -------------- src/backend/utils/cache/relcache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Ensure snapshot is registered within ScanPgRelation(). @ 2020-03-28 19:30 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2020-03-28 19:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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- Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/211d8f65392f7add35bcd02f49648e514d9558fc Modified Files -------------- src/backend/utils/cache/relcache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Ensure snapshot is registered within ScanPgRelation(). @ 2020-03-28 19:30 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2020-03-28 19:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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- Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/820f21a93f0bb92dde9fee5dbc3c68fd9be06579 Modified Files -------------- src/backend/utils/cache/relcache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2020-03-28 19:30 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-03-28 19:29 pgsql: Ensure snapshot is registered within ScanPgRelation(). Andres Freund <andres@anarazel.de> 2020-03-28 19:29 pgsql: Ensure snapshot is registered within ScanPgRelation(). Andres Freund <andres@anarazel.de> 2020-03-28 19:29 pgsql: Ensure snapshot is registered within ScanPgRelation(). Andres Freund <andres@anarazel.de> 2020-03-28 19:29 pgsql: Ensure snapshot is registered within ScanPgRelation(). Andres Freund <andres@anarazel.de> 2020-03-28 19:30 pgsql: Ensure snapshot is registered within ScanPgRelation(). Andres Freund <andres@anarazel.de> 2020-03-28 19:30 pgsql: Ensure snapshot is registered within ScanPgRelation(). Andres Freund <andres@anarazel.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox