postgresql/src/backend/access
David Rowley bb437f995d Add TID Range Scans to support efficient scanning ranges of TIDs
This adds a new executor node named TID Range Scan.  The query planner
will generate paths for TID Range scans when quals are discovered on base
relations which search for ranges on the table's ctid column.  These
ranges may be open at either end. For example, WHERE ctid >= '(10,0)';
will return all tuples on page 10 and over.

To support this, two new optional callback functions have been added to
table AM.  scan_set_tidrange is used to set the scan range to just the
given range of TIDs.  scan_getnextslot_tidrange fetches the next tuple
in the given range.

For AMs were scanning ranges of TIDs would not make sense, these functions
can be set to NULL in the TableAmRoutine.  The query planner won't
generate TID Range Scan Paths in that case.

Author: Edmund Horner, David Rowley
Reviewed-by: David Rowley, Tomas Vondra, Tom Lane, Andres Freund, Zhihong Yu
Discussion: https://postgr.es/m/CAMyN-kB-nFTkF=VA_JPwFNo08S0d-Yk0F741S2B7LDmYAi8eyA@mail.gmail.com
2021-02-27 22:59:36 +13:00
..
brin Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
common Fix some typos, grammar and style in docs and comments 2021-02-24 16:13:17 +09:00
gin VACUUM VERBOSE: Count "newly deleted" index pages. 2021-02-25 14:32:18 -08:00
gist VACUUM VERBOSE: Count "newly deleted" index pages. 2021-02-25 14:32:18 -08:00
hash Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
heap Add TID Range Scans to support efficient scanning ranges of TIDs 2021-02-27 22:59:36 +13:00
index Fix GiST index deletion assert issue. 2021-01-26 23:24:37 -08:00
nbtree VACUUM VERBOSE: Count "newly deleted" index pages. 2021-02-25 14:32:18 -08:00
rmgrdesc Use full 64-bit XIDs in deleted nbtree pages. 2021-02-24 18:41:34 -08:00
spgist VACUUM VERBOSE: Count "newly deleted" index pages. 2021-02-25 14:32:18 -08:00
table Enhance nbtree index tuple deletion. 2021-01-13 09:21:32 -08:00
tablesample Update copyright for 2021 2021-01-02 13:06:25 -05:00
transam Fix some typos, grammar and style in docs and comments 2021-02-24 16:13:17 +09:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00