postgresql/src/include/access
Tom Lane 9b88f27cb4 Allow index AMs to return either HeapTuple or IndexTuple format during IOS.
Previously, only IndexTuple format was supported for the output data of
an index-only scan.  This is fine for btree, which is just returning a
verbatim index tuple anyway.  It's not so fine for SP-GiST, which can
return reconstructed data that's much larger than a page.

To fix, extend the index AM API so that index-only scan data can be
returned in either HeapTuple or IndexTuple format.  There's other ways
we could have done it, but this way avoids an API break for index AMs
that aren't concerned with the issue, and it costs little except a couple
more fields in IndexScanDescs.

I changed both GiST and SP-GiST to use the HeapTuple method.  I'm not
very clear on whether GiST can reconstruct data that's too large for an
IndexTuple, but that seems possible, and it's not much of a code change to
fix.

Per a complaint from Vik Fearing.  Reviewed by Jason Li.

Discussion: https://postgr.es/m/49527f79-530d-0bfe-3dad-d183596afa92@2ndquadrant.fr
2017-02-27 17:20:34 -05:00
..
amapi.h Add optimizer and executor support for parallel index scans. 2017-02-15 13:53:24 -05:00
amvalidate.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
attnum.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
brin.h Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
brin_internal.h Allow index AMs to cache data across aminsert calls within a SQL command. 2017-02-09 11:52:12 -05:00
brin_page.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
brin_pageops.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
brin_revmap.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
brin_tuple.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
brin_xlog.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
bufmask.h Minor fixes for WAL consistency checking. 2017-02-14 12:41:01 -05:00
clog.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
commit_ts.h Fix race condition in reading commit timestamps 2017-01-19 18:24:17 -03:00
genam.h Allow index AMs to cache data across aminsert calls within a SQL command. 2017-02-09 11:52:12 -05:00
generic_xlog.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
gin.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
gin_private.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
ginblock.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
ginxlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
gist.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
gist_private.h Allow index AMs to return either HeapTuple or IndexTuple format during IOS. 2017-02-27 17:20:34 -05:00
gistscan.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
gistxlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
hash.h hash: Refactor overflow page allocation. 2017-02-27 22:59:55 +05:30
hash_xlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
heapam.h Fix interaction of partitioned tables with BulkInsertState. 2017-01-24 08:50:16 -05:00
heapam_xlog.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
hio.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
htup.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
htup_details.h Change some test macros to return true booleans 2017-01-18 18:06:13 -03:00
itup.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
multixact.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nbtree.h btree: Support parallel index scans. 2017-02-15 07:41:14 -05:00
nbtxlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
parallel.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
printsimple.h Add a new DestReceiver for printing tuples without catalog access. 2017-01-24 16:53:56 -05:00
printtup.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
reloptions.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
relscan.h Allow index AMs to return either HeapTuple or IndexTuple format during IOS. 2017-02-27 17:20:34 -05:00
rewriteheap.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rmgr.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
rmgrlist.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
sdir.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
skey.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
slru.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
spgist.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
spgist_private.h Allow index AMs to return either HeapTuple or IndexTuple format during IOS. 2017-02-27 17:20:34 -05:00
spgxlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
stratnum.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
subtrans.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
sysattr.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
timeline.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
transam.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tsmapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tupconvert.h Fix ALTER TABLE / SET TYPE for irregular inheritance 2017-01-09 19:26:58 -03:00
tupdesc.h Add a SHOW command to the replication command language. 2017-01-24 17:04:12 -05:00
tupmacs.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tuptoaster.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
twophase.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
twophase_rmgr.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
valid.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
visibilitymap.h Fix typos in comments. 2017-02-06 11:33:58 +02:00
xact.h Fix typos in comments. 2017-02-06 11:33:58 +02:00
xlog.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
xlog_internal.h Rename user-facing tools with "xlog" in the name to say "wal". 2017-02-09 16:23:46 -05:00
xlogdefs.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
xloginsert.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
xlogreader.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
xlogrecord.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
xlogutils.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00