Re: Tid scan improvements
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: David Rowley <david.rowley@2ndquadrant.com>,
Edmund Horner <ejrh00@gmail.com>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>,
PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2019-03-25T22:53:56Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > I was kinda hoping to keep block numbers out of the "main" APIs, to > avoid assuming everything is BLCKSZ based. I don't have a particular > problem allowing an optional setscanlimits type callback that works with > block numbers. The planner could check its presence and just not build > tid range scans if not present. Alternatively a bespoke scan API for > tid range scans, like the later patches in the tableam series for > bitmap, sample, analyze scans, might be an option. Given Andres' API concerns, and the short amount of time remaining in this CF, I'm not sure how much of this patch set we can expect to land in v12. It seems like it might be a good idea to scale back our ambitions and see whether there's a useful subset we can push in easily. With that in mind, I went ahead and pushed 0001+0004, since improving the planner's selectivity estimate for a "ctid vs constant" qual is likely to be helpful whether the executor is smart about it or not. FWIW, I don't really see the point of treating 0002 as a separate patch. If it had some utility on its own, then it'd be sensible, but what would that be? Also, it looks from 0002 like you are trying to overload rs_startblock with a different meaning than it has for syncscans, and I think that might be a bad idea. regards, tom lane
Commits
-
Add TID Range Scans to support efficient scanning ranges of TIDs
- bb437f995d47 14.0 landed
-
Improve planner's selectivity estimates for inequalities on CTID.
- f7111f72d2fd 12.0 landed