Re: [HACKERS] CLUSTER command progress monitor

Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp>

From: Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp>
To: Rafia Sabih <rafia.pghackers@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Dmitry Dolgov <9erthalion6@gmail.com>, Peter Geoghegan <pg@bowt.ie>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Jeff Janes <jeff.janes@gmail.com>, Thomas Munro <thomas.munro@enterprisedb.com>, Michael Paquier <michael.paquier@gmail.com>
Date: 2019-03-19T01:43:23Z
Lists: pgsql-hackers

Attachments

Hi Rafia!

On 2019/03/18 20:42, Rafia Sabih wrote:
> On Fri, 8 Mar 2019 at 09:14, Tatsuro Yamada
> <yamada.tatsuro@lab.ntt.co.jp> wrote:
>> Attached file is rebased patch on current HEAD.
>> I changed a status. :)
>>
>>
> Looks like the patch needs a rebase.
> I was on the commit fb5806533f9fe0433290d84c9b019399cd69e9c2
> 
> PFA reject file in case you want to have a look.

Thanks for testing it. :)
I rebased the patch on the current head: f2004f19ed9c9228d3ea2b12379ccb4b9212641f.

Please find attached file.

Also, I share my test case of progress monitor below.

=== My test case ===

[Terminal1]
Run this query on psql:

    \a \t
    select * from pg_stat_progress_cluster; \watch 0.05

[Terminal2]
Run these queries on psql:

drop table t1;

create table t1 as select a, random() * 1000 as b from generate_series(0, 999999) a;
create index idx_t1 on t1(a);
create index idx_t1_b on t1(b);
analyze t1;

-- index scan
set enable_seqscan to off;
cluster verbose t1 using idx_t1;

-- seq scan
set enable_seqscan to on;
set enable_indexscan to off;
cluster verbose t1 using idx_t1;

-- only given table name to cluster command
cluster verbose t1;

-- only cluster command
cluster verbose;

-- vacuum full
vacuum full t1;

-- vacuum full
vacuum full;

====================


Regards,
Tatsuro Yamada









Commits

  1. Fix progress reporting of CLUSTER / VACUUM FULL

  2. Fix thinko when ending progress report for a backend

  3. Report progress of REINDEX operations

  4. Add progress reporting for CLUSTER and VACUUM FULL.

  5. Un-hide most cascaded-drop details in regression test results.

  6. Fix memory leak in printtup.c.

  7. Remove unused macro