pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: In rebuild_relation(), don't access an already-closed relcache e 3+ messages / 1 participants [nested] [flat]
* pgsql: In rebuild_relation(), don't access an already-closed relcache e @ 2017-03-04 21:09 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2017-03-04 21:09 UTC (permalink / raw) To: pgsql-committers In rebuild_relation(), don't access an already-closed relcache entry. This reliably fails with -DRELCACHE_FORCE_RELEASE, as reported by Andrew Dunstan, and could sometimes fail in normal operation, resulting in a wrong persistence value being used for the transient table. It's not immediately clear to me what effects that might have beyond the risk of a crash while accessing OldHeap->rd_rel->relpersistence, but it's probably not good. Bug introduced by commit f41872d0c, and made substantially worse by commit 85b506bbf, which added a second such access significantly later than the heap_close. I doubt the first reference could fail in a production scenario, but the second one definitely could. Discussion: https://postgr.es/m/7b52f900-0579-cda9-ae2e-de5da17090e6@2ndQuadrant.com Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/dbca84f04ed5debe748029699aa44fa86beca32d Modified Files -------------- src/backend/commands/cluster.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: In rebuild_relation(), don't access an already-closed relcache e @ 2017-03-04 21:09 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2017-03-04 21:09 UTC (permalink / raw) To: pgsql-committers In rebuild_relation(), don't access an already-closed relcache entry. This reliably fails with -DRELCACHE_FORCE_RELEASE, as reported by Andrew Dunstan, and could sometimes fail in normal operation, resulting in a wrong persistence value being used for the transient table. It's not immediately clear to me what effects that might have beyond the risk of a crash while accessing OldHeap->rd_rel->relpersistence, but it's probably not good. Bug introduced by commit f41872d0c, and made substantially worse by commit 85b506bbf, which added a second such access significantly later than the heap_close. I doubt the first reference could fail in a production scenario, but the second one definitely could. Discussion: https://postgr.es/m/7b52f900-0579-cda9-ae2e-de5da17090e6@2ndQuadrant.com Branch ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/68f7b91e509d9ac95a376805df22bc9b51e71255 Modified Files -------------- src/backend/commands/cluster.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: In rebuild_relation(), don't access an already-closed relcache e @ 2017-03-04 21:09 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2017-03-04 21:09 UTC (permalink / raw) To: pgsql-committers In rebuild_relation(), don't access an already-closed relcache entry. This reliably fails with -DRELCACHE_FORCE_RELEASE, as reported by Andrew Dunstan, and could sometimes fail in normal operation, resulting in a wrong persistence value being used for the transient table. It's not immediately clear to me what effects that might have beyond the risk of a crash while accessing OldHeap->rd_rel->relpersistence, but it's probably not good. Bug introduced by commit f41872d0c, and made substantially worse by commit 85b506bbf, which added a second such access significantly later than the heap_close. I doubt the first reference could fail in a production scenario, but the second one definitely could. Discussion: https://postgr.es/m/7b52f900-0579-cda9-ae2e-de5da17090e6@2ndQuadrant.com Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/807df31d19e7014df1d3621292589d3653f614f2 Modified Files -------------- src/backend/commands/cluster.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-03-04 21:09 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-03-04 21:09 pgsql: In rebuild_relation(), don't access an already-closed relcache e Tom Lane <tgl@sss.pgh.pa.us> 2017-03-04 21:09 pgsql: In rebuild_relation(), don't access an already-closed relcache e Tom Lane <tgl@sss.pgh.pa.us> 2017-03-04 21:09 pgsql: In rebuild_relation(), don't access an already-closed relcache e Tom Lane <tgl@sss.pgh.pa.us>
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