Re: [PATCH] Support for basic ALTER TABLE progress reporting. - Mailing list pgsql-hackers

From jian he
Subject Re: [PATCH] Support for basic ALTER TABLE progress reporting.
Date
Msg-id CACJufxGNY77EtPQjU+MsAjaO-Uto-sLnJg55ePLMr6JFc6MH+w@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Support for basic ALTER TABLE progress reporting.  (Jiří Kavalík <jkavalik@gmail.com>)
List pgsql-hackers
hi.
within ATRewriteTable we have:
pgstat_progress_update_param(PROGRESS_CLUSTER_TOTAL_HEAP_BLKS,
RelationGetNumberOfBlocks(oldrel));
        pgstat_progress_update_param(PROGRESS_CLUSTER_TOTAL_HEAP_BLKS,
                                             heapScan->rs_nblocks);

PROGRESS_CLUSTER_TOTAL_HEAP_BLKS
value is fixed, we only need to call pgstat_progress_update_param once here?


another patch [1] is expected to refactor pg_stat_progress_cluster a lot, so I'm
unsure whether it's a good idea to put CLUSTER, VACUUM FULL, or ALTER TABLE into
pg_stat_progress_cluster.
alternatively, we could introduce a separate progress report specifically for
ALTER TABLE, allowing us to distinguish between table rewrite and table
scan.

[1] https://commitfest.postgresql.org/patch/5117



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: amcheck support for BRIN indexes
Next
From: Bertrand Drouvot
Date:
Subject: Re: Adding wait events statistics