Re: [patch] CLUSTER blocks scanned progress reporting

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] CLUSTER blocks scanned progress reporting
Date: 2020-11-27 11:21:12
Message-ID: e363cdc6-68b6-1ca8-1351-9ef155f9e84a@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020/11/27 1:51, Fujii Masao wrote:
>
>
> On 2020/11/27 1:45, Matthias van de Meent wrote:
>> On Thu, 26 Nov 2020 at 00:55, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>>>
>>> +                                * A heap scan need not return tuples for the last page it has
>>> +                                * scanned. To ensure that heap_blks_scanned is equivalent to
>>> +                                * total_heap_blks after the table scan phase, this parameter
>>> +                                * is manually updated to the correct value when the table scan
>>> +                                * finishes.
>>>
>>> So it's better to update this comment a bit? For example,
>>>
>>>       If the scanned last pages are empty, it's possible to go to the next phase
>>>       while heap_blks_scanned != heap_blks_total. To ensure that they are
>>>       equivalet after the table scan phase, this parameter is manually updated
>>>       to the correct value when the table scan finishes.
>>>
>>
>> PFA a patch with updated message and comment. I've reworded the
>> messages to specifically mention empty pages and the need for setting
>> heap_blks_scanned = total_heap_blks explicitly.
>
> Thanks for updating the patch! It looks good to me.
> Barring any objection, I will commit this patch (also back-patch to v12).

Pushed. Thanks!

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2020-11-27 12:05:00 Re: A problem about partitionwise join
Previous Message Ashutosh Bapat 2020-11-27 10:40:27 Printing LSN made easy