aboutsummaryrefslogtreecommitdiff
path: root/contrib/jsonb_plpython/jsonb_plpython2u.control
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-10-01 11:51:07 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-10-01 11:51:07 -0400
commit1f25c7a8fc99bb33a9b978ab92b9ba9840366753 (patch)
tree8d687886a108a197a1a2118b33819b567c7745ca /contrib/jsonb_plpython/jsonb_plpython2u.control
parent4c985549fe82c2a283f5f113747ae2ffd1a95926 (diff)
downloadpostgresql-1f25c7a8fc99bb33a9b978ab92b9ba9840366753.tar.gz
postgresql-1f25c7a8fc99bb33a9b978ab92b9ba9840366753.zip
Fix tuple_data_split() to not open a relation without any lock.
contrib/pageinspect's tuple_data_split() function thought it could get away with opening the referenced relation with NoLock. In practice there's no guarantee that the current session holds any lock on that rel (even if we just read a page from it), so that this is unsafe. Switch to using AccessShareLock. Also, postpone closing the relation, so that we needn't copy its tupdesc. Also, fix unsafe use of att_isnull() for attributes past the end of the tuple. Per testing with a patch that complains if we open a relation without holding any lock on it. I don't plan to back-patch that patch, but we should close the holes it identifies in all supported branches. Discussion: https://postgr.es/m/2038.1538335244@sss.pgh.pa.us
Diffstat (limited to 'contrib/jsonb_plpython/jsonb_plpython2u.control')
0 files changed, 0 insertions, 0 deletions