On Thu, 14 Mar 2019 at 23:37, Edmund Horner <ejr...@gmail.com> wrote: > On Thu, 14 Mar 2019 at 23:06, David Rowley <david.row...@2ndquadrant.com> > wrote: > > Just looking again, I think the block of code starting: > > > > + if (density > 0.0) > > > > needs a comment to mention what it's doing. Perhaps: > > > > + /* > > + * Using the average tuples per page, calculate how far into > > + * the page the itemptr is likely to be and adjust block > > + * accordingly. > > + */ > > + if (density > 0.0) > > > > Or some better choice of words. With that done, I think 0001 is good to go. > > Ok, I'll look at it and hopefully get a new patch up soon.
Hullo, Here's a new set of patches. It includes new versions of the other patches, which needed to be rebased because of the introduction of the "tableam" API by c2fe139c20. I've had to adapt it to use the table scan API. I've got it compiling and passing tests, but I'm uneasy about some things that still use the heapam API. 1. I call heap_setscanlimits as I'm not sure there is a tableam equivalent. 2. I'm not sure whether non-heap tableam implementations can also be supported by my TID Range Scan: we need to be able to set the scan limits. There may not be any other implementations yet, but when there are, how do we stop the planner using a TID Range Scan for non-heap relations? 3. When fetching tuples, I see that nodeSeqscan.c uses table_scan_getnextslot, which saves dealing with HeapTuples. But nodeTidrangescan wants to do some checking of the block and offset before returning the slot. So I have it using heap_getnext and ExecStoreBufferHeapTuple. Apart from being heapam-specific, it's just not as clean as the new API calls. Ideally, we can get to to support general tableam implementations rather than using heapam-specific calls. Any advice on how to do this? Thanks Edmund
v7-0001-Add-selectivity-estimate-for-CTID-system-variables.patch
Description: Binary data
v7-0002-Support-backward-scans-over-restricted-ranges-in-hea.patch
Description: Binary data
v7-0004-TID-selectivity-reduce-the-density-of-the-last-page-.patch
Description: Binary data
v7-0003-Support-range-quals-in-Tid-Scan.patch
Description: Binary data