Re: Unusable SP-GiST index
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vik Fearing <vik@2ndquadrant.fr>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-01-04T00:21:36Z
Lists: pgsql-hackers
Attachments
- indexonlyscan-can-return-heaptuple-1.patch (text/x-diff) patch
- (unnamed) (text/plain)
I wrote: > After looking a bit at gist and sp-gist, neither of them would find that > terribly convenient; they really want to create one blob of memory per > index entry so as to not complicate storage management too much. But > they'd be fine with making that blob be a HeapTuple not IndexTuple. > So maybe the right approach is to expand the existing API to allow the > AM to return *either* a heap or index tuple; that could be made to not > be an API break. Here's a draft patch along those lines. With this approach, btree doesn't need to be touched at all, since what it's returning certainly is an IndexTuple anyway. I fixed both SPGIST and GIST to use HeapTuple return format. It's not very clear to me whether GIST has a similar hazard with very large return values, but it might, and it's simple enough to change. regards, tom lane
Commits
-
Allow index AMs to return either HeapTuple or IndexTuple format during IOS.
- 9b88f27cb42f 10.0 landed