Fix confusion on different kinds of slots in IndexOnlyScans.
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Fix confusion on different kinds of slots in IndexOnlyScans. We used the same slot to store a tuple from the index, and to store a tuple from the table. That's not OK. It worked with the heap, because heapam_getnextslot() stores a HeapTuple to the slot, and doesn't care how large the tts_values/nulls arrays are. But when I played with a toy table AM implementation that used a virtual tuple, it caused memory overruns. In the passing, tidy up comments on the ioss_PscanLen fields.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/nodeIndexonlyscan.c | modified | +13 −3 |
| src/include/nodes/execnodes.h | modified | +4 −2 |