postgresql/src/backend/access
Tom Lane 9a3cebeaa7 Change executor to just Assert that table locks were already obtained.
Instead of locking tables during executor startup, just Assert that
suitable locks were obtained already during the parse/plan pipeline
(or re-obtained by the plan cache).  This must be so, else we have a
hazard that concurrent DDL has invalidated the plan.

This is pretty inefficient as well as undercommented, but it's all going
to go away shortly, so I didn't try hard.  This commit is just another
attempt to use the buildfarm to see if we've missed anything in the plan
to simplify the executor's table management.

Note that the change needed here in relation_open() exposes that
parallel workers now really are accessing tables without holding any
lock of their own, whereas they were not doing that before this commit.
This does not give me a warm fuzzy feeling about that aspect of parallel
query; it does not seem like a good design, and we now know that it's
had exactly no actual testing.  I think that we should modify parallel
query so that that change can be reverted.

Discussion: https://postgr.es/m/468c85d9-540e-66a2-1dde-fec2b741e688@lab.ntt.co.jp
2018-10-03 16:05:12 -04:00
..
brin Fail BRIN control functions during recovery explicitly 2018-06-14 12:51:32 -04:00
common Use slots more widely in tuple mapping code and make naming more consistent. 2018-10-02 11:14:26 -07:00
gin Fix past pd_upper write in ginRedoRecompress() 2018-09-09 21:19:29 +03:00
gist Add support for nearest-neighbor (KNN) searches to SP-GiST 2018-09-19 01:54:10 +03:00
hash During the split, set checksum on an empty hash index page. 2018-09-04 08:35:42 +05:30
heap Change executor to just Assert that table locks were already obtained. 2018-10-03 16:05:12 -04:00
index Add support for nearest-neighbor (KNN) searches to SP-GiST 2018-09-19 01:54:10 +03:00
nbtree Reduce path length for locking leaf B-tree pages during insertion 2018-07-28 00:31:40 +03:00
rmgrdesc printf("%lf") is not portable, so omit the "l". 2018-05-20 11:40:54 -04:00
spgist Minor formatting cleanup for 2a6368343f 2018-09-27 23:29:50 +03:00
tablesample Rethink how to get float.h in old Windows API for isnan/isinf 2018-07-11 09:11:48 -04:00
transam Fix assertion failure when updating full_page_writes for checkpointer. 2018-09-28 16:40:04 +05:30
Makefile TABLESAMPLE, SQL Standard and extensible 2015-05-15 14:37:10 -04:00