From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Generalize ereport_startup_progress infrastructure |
Date: | 2022-08-02 07:25:01 |
Message-ID: | CALj2ACWijWQkoqdu5zhw=4pZHdLD07prHuppfPT6Y_8uVGjA0Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
ereport_startup_progress infrastructure added by commit 9ce346e [1]
will be super-useful for reporting progress of any long-running server
operations, not just the startup process operations. For instance,
postmaster can use it for reporting progress of temp file and temp
relation file removals [2], checkpointer can use it for reporting
progress of snapshot or mapping file processing or even WAL file
processing and so on. And I'm sure there can be many places in the
code where we have while or for loops which can, at times, take a long
time to finish and having a log message there would definitely help.
Here's an attempt to generalize the ereport_startup_progress
infrastructure. The attached v1 patch places the code in elog.c/.h,
renames associated functions and variables, something like
ereport_startup_progress to ereport_progress,
log_startup_progress_interval to log_progress_report_interval and so
on.
Thoughts?
Thanks Robert for an offlist chat.
[1]
commit 9ce346eabf350a130bba46be3f8c50ba28506969
Author: Robert Haas <rhaas(at)postgresql(dot)org>
Date: Mon Oct 25 11:51:57 2021 -0400
Report progress of startup operations that take a long time.
--
Bharath Rupireddy
RDS Open Source Databases: https://aws.amazon.com/
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Generalize-ereport_startup_progress-infrastructur.patch | application/octet-stream | 17.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2022-08-02 07:37:58 | Re: Typo in pg_db_role_setting.h |
Previous Message | Amit Langote | 2022-08-02 07:19:28 | Re: Skip partition tuple routing with constant partition key |