aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-01-12 15:46:37 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2018-01-12 15:46:37 -0500
commit55e5eb4d97fbe78af9c81d808afbd0d8559fb392 (patch)
tree6b4644109cbee4a4288ebbb833f418b9bfb84b30 /src/tutorial/funcs.source
parentd3ca1a6c3721b910fa8c05f41397727a53409fd3 (diff)
downloadpostgresql-55e5eb4d97fbe78af9c81d808afbd0d8559fb392.tar.gz
postgresql-55e5eb4d97fbe78af9c81d808afbd0d8559fb392.zip
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT.
If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the removed member, make_inh_translation_list sees that its columns have attinhcount=0 and decides they aren't the columns it's looking for. An ideal fix, perhaps, would avoid including such a just-removed member table in the query at all; but there seems no way to accomplish that without adding expensive catalog rechecks or creating a likelihood of deadlocks. Instead, let's just drop the check on attinhcount. In this way, a query that's included a just-disinherited child will still succeed, which is not a completely unreasonable behavior. This problem has existed for a long time, so back-patch to all supported branches. Also add an isolation test verifying related behaviors. Patch by me; the new isolation test is based on Kyotaro Horiguchi's work. Discussion: https://postgr.es/m/20170626.174612.23936762.horiguchi.kyotaro@lab.ntt.co.jp
Diffstat (limited to 'src/tutorial/funcs.source')
0 files changed, 0 insertions, 0 deletions