Re: Add index scan progress to pg_stat_progress_vacuum

From: "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Subject: Re: Add index scan progress to pg_stat_progress_vacuum
Date: 2022-04-05 16:42:28
Message-ID: 0601FEDE-5DE8-4F03-9F7C-7A927302475C@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I nevertheless think that's not acceptable. The whole premise of the progress
> reporting infrastructure is to be low overhead. It's OK to require locking to
> initialize parallel progress reporting, it's definitely not ok to require
> locking to report progress.

Fair point.

> Why isn't the obvious thing to do here to provide a way to associate workers
> with their leaders in shared memory, but to use the existing progress fields
> to report progress? Then, when querying progress, the leader and workers
> progress fields can be combined to show the overall progress?

The original intent was this, however the workers
can exit before the command completes and the
worker progress data will be lost.
This is why the shared memory was introduced.
This allows the worker progress to persist for the duration
of the command.

Regards,

Sami Imseih
Amazon Web Services.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2022-04-05 16:42:47 Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
Previous Message Robert Haas 2022-04-05 16:40:52 Re: How to generate a WAL record spanning multiple WAL files?