Re: Index-only scans vs. partially-retrievable indexes
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2022-01-02T23:22:23Z
Lists: pgsql-hackers
Attachments
- 0001-fix-lossy-indexquals-better.patch (text/x-diff) patch 0001
- 0002-revert-b5febc1d1.patch (text/x-diff) patch 0002
I wrote: > Unless somebody's got a better idea, I'll push forward with making > this happen. Here's a proposed patch for that. I ended up reverting the code changes of 4ace45677 in favor of an alternative I'd considered previously, which is to mark the indextlist elements as resjunk if they're non-retrievable, and then make setrefs.c deal with not relying on those elements. This avoids the EXPLAIN breakage I showed, since now we still have the indextlist elements needed to interpret the indexqual and indexorderby expressions. 0001 is what I propose to back-patch (modulo putting the new IndexOnlyScan.recheckqual field at the end, in the back branches). In addition, it seems to me that we can simplify check_index_only() by reverting b5febc1d1's changes, because we've now been forced to put in a non-half-baked solution for the problem it addressed. That's 0002 attached. I'd be inclined not to back-patch that though. regards, tom lane
Commits
-
Handle mixed returnable and non-returnable columns better in IOS.
- 8a2e323f2085 15.0 landed
-
Fix index-only scan plans, take 2.
- ec367452179c 11.15 landed
- d228af79d0f2 14.2 landed
- 9c4f38908447 12.10 landed
- 9a3ddeb519e8 15.0 landed
- 7d344f00413a 10.20 landed
- 20d08b2c61cd 13.6 landed