Re: Improvements and additions to COPY progress reporting
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>, Matthias van de Meent <boekewurm+postgres@gmail.com>, Josef Šimánek <josef.simanek@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Justin Pryzby <pryzby@telsasoft.com>
Date: 2021-02-20T07:19:20Z
Lists: pgsql-hackers
On Sat, Feb 20, 2021 at 11:39:22AM +0530, Bharath Rupireddy wrote: > Actually in the code base the style of that variable declaration and > usage of pgstat_progress_update_multi_param is a mix. For instance, in > lazy_scan_heap, ReindexRelationConcurrently, the variables are > declared at the start of the function. And in _bt_spools_heapscan, > index_build, validate_index, perform_base_backup, the variables are > declared within a separate block. I think that we should encourage the use of pgstat_progress_update_multi_param() where we can, as it makes consistent the updates to all the parameters according to st_changecount. That's also usually cleaner to store all the parameters that are changed if these are updated multiple times like the REINDEX CONCURRENTLY ones. The context of the code also matters, of course. Scanning through the patch set, 0002 is a good idea taken independently. -- Michael
Commits
-
Add some basic tests for progress reporting of COPY
- 15639d5e8f6f 14.0 landed
-
Add support for more progress reporting in COPY
- 9d2d45700928 14.0 landed
-
doc: Add backlinks to progress reporting documentation
- 8a8f4d8ede28 14.0 landed