On Wed, Aug 17, 2022 at 2:45 AM Nathan Bossart <nathandboss...@gmail.com> wrote:
>
> On Wed, Aug 10, 2022 at 11:00:20AM -0400, Robert Haas wrote:
> > Maybe the checkpointer is a better candidate, but somehow I feel that
> > we can't consider this sort of thing separate from the existing
> > progress reporting that checkpointer already does. Perhaps we need to
> > think of changing or improving that in some way rather than adding
> > something wholly new alongside the existing system.
>
> I agree that the checkpointer has a good chance of being a better
> candidate.  Are you thinking of integrating this into log_checkpoints
> somehow?  Perhaps this parameter could optionally accept an interval for
> logging the progress of ongoing checkpoints.

Certainly the checkpointer is an immediate candidate. For instance, I
can think of using ereport_progress() in CheckPointSnapBuild() for
snapshot files processing, CheckPointLogicalRewriteHeap() for mapping
files processing, BufferSync() for checkpointing dirty buffers (?),
ProcessSyncRequests() for processing fsync() requests,
RemoveOldXlogFiles(), RemoveNonParentXlogFiles()(?). I personally have
seen cases where some of these checkpoint operations take a lot of
time in production environments and a better observability would help
a lot.

However, I'm not sure if turning log_checkpoints to an integer type to
use for checkpoint progress reporting is a good idea here.

As I explained upthread [1], I'd vote for a single GUC at the entire
server level. If the users/customers request per-process or
per-operation progress report GUCs, we can then consider it.

Thoughts?

[1] 
https://www.postgresql.org/message-id/CALj2ACUJA73nCK_Li7v4_OOkRqwQBX14Fx2ALb7GDRwUTNGK-Q%40mail.gmail.com

-- 
Bharath Rupireddy
RDS Open Source Databases: https://aws.amazon.com/rds/postgresql/


Reply via email to