+1, This would be an nice improvement even the lseek is fast usually, it is a
system call after all
Buzhen--
发件人:Andy Fan
日 期:2021年05月31日 13:46:22
收件人:PostgreSQL Hackers
主 题:Re: Regarding the necessity of RelationGetNumberOfBlocks
On Sat, May 29, 2021 at 11:23 AM Andy Fan wrote:
> Hi:
>
> I'm always confused about the following codes.
>
> static void
> initscan(HeapScanDesc scan, ScanKey key, bool keep_startblock)
> {
> ParallelBlockTableScanDesc bpscan = NULL;
> bool allow_strat;
> bool allow_sync;
>
> /*
> * Determine
> 1. Why do we need scan->rs_nblocks =
>RelationGextNumberOfBlocks(scan->rs_base.rs_rd) for every rescan, which
> looks
>mismatched with the comments along the code. and the comments looks
>reasonable to me.
> 2. For the heap scan after an IndexScan, we don't need to know the heap
>
Hi:
I'm always confused about the following codes.
static void
initscan(HeapScanDesc scan, ScanKey key, bool keep_startblock)
{
ParallelBlockTableScanDesc bpscan = NULL;
bool allow_strat;
bool allow_sync;
/*
* Determine the number of blocks we have to scan.
*
* It is sufficient to do this once