diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-03-04 16:09:33 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-03-04 16:09:33 -0500 |
commit | 68f7b91e509d9ac95a376805df22bc9b51e71255 (patch) | |
tree | 155a928eab755c73ada9e3e6e38b0e9d56eb0d84 /src/backend/commands/matview.c | |
parent | b0344f877f8c0f58e002d55349b233e436df8358 (diff) | |
download | postgresql-68f7b91e509d9ac95a376805df22bc9b51e71255.tar.gz postgresql-68f7b91e509d9ac95a376805df22bc9b51e71255.zip |
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
Diffstat (limited to 'src/backend/commands/matview.c')
0 files changed, 0 insertions, 0 deletions