Re: Add index scan progress to pg_stat_progress_vacuum

Sami Imseih <simseih@amazon.com>

From: "Imseih (AWS), Sami" <simseih@amazon.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Peter Geoghegan <pg@bowt.ie>, "Bossart, Nathan" <bossartn@amazon.com>, Justin Pryzby <pryzby@telsasoft.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2022-03-12T07:00:06Z
Lists: pgsql-hackers

Attachments

> nitpick: Can we remove the extra spaces in the parentheses?

fixed

> What does it mean if there isn't an entry in the map?  Is this actually
> expected, or should we ERROR instead?

I cleaned up the code here and added comments. 

> I think the number of entries should be shared between
> VacuumWorkerProgressShmemInit() and VacuumWorkerProgressShmemSize().
> Otherwise, we might update one and not the other.

Fixed

> I think we should elaborate a bit more in this comment.  It's difficult to
> follow what this is doing without referencing the comment above
> set_vacuum_worker_progress().

More comments added

I also simplified the 0002 patch as well.

-- 
Sami Imseih
Amazon Web Services

Commits

  1. Report index vacuum progress.

  2. Add new parallel message type to progress reporting.

  3. Remove MaxBackends variable in favor of GetMaxBackends() function.