]> granicus.if.org Git - postgresql/commit
Remove more redundant relation locking during executor startup.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 6 Oct 2018 19:12:51 +0000 (15:12 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 6 Oct 2018 19:12:51 +0000 (15:12 -0400)
commitf2343653f5b2aecfc759f36dbb3fd2a61f36853e
tree3e1fcb103bd838a0b3715b6e11a9e44d3f358f10
parent0209f0285d9b1c60bf74cc9f5f0133d7bdd887c3
Remove more redundant relation locking during executor startup.

We already have appropriate locks on every relation listed in the
query's rangetable before we reach the executor.  Take the next step
in exploiting that knowledge by removing code that worries about
taking locks on non-leaf result relations in a partitioned table.

In particular, get rid of ExecLockNonLeafAppendTables and a stanza in
InitPlan that asserts we already have locks on certain such tables.

In passing, clean up some now-obsolete comments in InitPlan.

Amit Langote, reviewed by David Rowley and Jesper Pedersen,
and whacked around a bit more by me

Discussion: https://postgr.es/m/468c85d9-540e-66a2-1dde-fec2b741e688@lab.ntt.co.jp
src/backend/executor/execMain.c
src/backend/executor/execUtils.c
src/backend/executor/nodeAppend.c
src/backend/executor/nodeMergeAppend.c
src/include/executor/executor.h