Commit ad0bda5
committed
Store tuples for EvalPlanQual in slots, rather than as HeapTuples.
For the upcoming pluggable table access methods it's quite
inconvenient to store tuples as HeapTuples, as that'd require
converting tuples from a their native format into HeapTuples. Instead
use slots to manage epq tuples.
To fit into that scheme, change the foreign data wrapper callback
RefetchForeignRow, to store the tuple in a slot. Insist on using the
caller provided slot, so it conveniently can be stored in the
corresponding EPQ slot. As there is no in core user of
RefetchForeignRow, that change was done blindly, but we plan to test
that soon.
To avoid duplicating that work for row locks, move row locks to just
directly use the EPQ slots - it previously temporarily stored tuples
in LockRowsState.lr_curtuples, but that doesn't seem beneficial, given
we'd possibly end up with a significant number of additional slots.
The behaviour of es_epqTupleSet[rti -1] is now checked by
es_epqTupleSlot[rti -1] != NULL, as that is distinguishable from a
slot containing an empty tuple.
Author: Andres Freund, Haribabu Kommi, Ashutosh Bapat
Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de1 parent 6cbdbd9 commit ad0bda5
File tree
13 files changed
+188
-212
lines changed- doc/src/sgml
- src
- backend/executor
- include
- executor
- foreign
- nodes
13 files changed
+188
-212
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
992 | 992 | | |
993 | 993 | | |
994 | 994 | | |
995 | | - | |
| 995 | + | |
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
| 999 | + | |
999 | 1000 | | |
1000 | 1001 | | |
1001 | 1002 | | |
1002 | | - | |
| 1003 | + | |
1003 | 1004 | | |
1004 | 1005 | | |
1005 | 1006 | | |
1006 | 1007 | | |
1007 | | - | |
| 1008 | + | |
| 1009 | + | |
1008 | 1010 | | |
1009 | 1011 | | |
1010 | 1012 | | |
1011 | | - | |
1012 | | - | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1018 | 1020 | | |
1019 | 1021 | | |
1020 | 1022 | | |
| |||
1026 | 1028 | | |
1027 | 1029 | | |
1028 | 1030 | | |
1029 | | - | |
| 1031 | + | |
1030 | 1032 | | |
1031 | 1033 | | |
1032 | 1034 | | |
| |||
0 commit comments