Re: [patch] CLUSTER blocks scanned progress reporting

2020-11-27 Thread Fujii Masao
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 wrote: +    * A heap scan need not return tuples for the last page it has +    * scanned. To ensure t

Re: [patch] CLUSTER blocks scanned progress reporting

2020-11-26 Thread Fujii Masao
On 2020/11/27 1:45, Matthias van de Meent wrote: On Thu, 26 Nov 2020 at 00:55, Fujii Masao wrote: +* A heap scan need not return tuples for the last page it has +* scanned. To ensure that heap_blks_scanned is equivalent to +

Re: [patch] CLUSTER blocks scanned progress reporting

2020-11-26 Thread Matthias van de Meent
On Thu, 26 Nov 2020 at 00:55, Fujii Masao 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_

Re: [patch] CLUSTER blocks scanned progress reporting

2020-11-25 Thread Fujii Masao
On 2020/11/25 20:52, Matthias van de Meent wrote: On Wed, 25 Nov 2020 at 10:35, Fujii Masao wrote: On 2020/11/25 0:25, Matthias van de Meent wrote: I noticed that with my proposed patch it is still possible to go to the next phase while heap_blks_scanned != heap_blks_total. This can happe

Re: [patch] CLUSTER blocks scanned progress reporting

2020-11-25 Thread Matthias van de Meent
On Wed, 25 Nov 2020 at 10:35, Fujii Masao wrote: > > On 2020/11/25 0:25, Matthias van de Meent wrote: > > > > I noticed that with my proposed patch it is still possible to go to > > the next phase while heap_blks_scanned != heap_blks_total. This can > > happen when the final heap pages contain onl

Re: [patch] CLUSTER blocks scanned progress reporting

2020-11-25 Thread Fujii Masao
On 2020/11/25 0:25, Matthias van de Meent wrote: On Tue, 24 Nov 2020 at 15:05, Fujii Masao wrote: On 2020/11/21 2:32, Matthias van de Meent wrote: Hi, The pg_stat_progress_cluster view can report incorrect heap_blks_scanned values when synchronize_seqscans is enabled, because it allows th

Re: [patch] CLUSTER blocks scanned progress reporting

2020-11-24 Thread Matthias van de Meent
On Tue, 24 Nov 2020 at 15:05, Fujii Masao wrote: > > On 2020/11/21 2:32, Matthias van de Meent wrote: > > Hi, > > > > The pg_stat_progress_cluster view can report incorrect > > heap_blks_scanned values when synchronize_seqscans is enabled, because > > it allows the sequential heap scan to not star

Re: [patch] CLUSTER blocks scanned progress reporting

2020-11-24 Thread Fujii Masao
On 2020/11/21 2:32, Matthias van de Meent wrote: Hi, The pg_stat_progress_cluster view can report incorrect heap_blks_scanned values when synchronize_seqscans is enabled, because it allows the sequential heap scan to not start at block 0. This can result in wraparounds in the heap_blks_scanne

[patch] CLUSTER blocks scanned progress reporting

2020-11-20 Thread Matthias van de Meent
Hi, The pg_stat_progress_cluster view can report incorrect heap_blks_scanned values when synchronize_seqscans is enabled, because it allows the sequential heap scan to not start at block 0. This can result in wraparounds in the heap_blks_scanned column when the table scan wraps around, and startin