Generalize ereport_startup_progress infrastructure

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Generalize ereport_startup_progress infrastructure
Дата
Msg-id CALj2ACWijWQkoqdu5zhw=4pZHdLD07prHuppfPT6Y_8uVGjA0Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Generalize ereport_startup_progress infrastructure  (Robert Haas <robertmhaas@gmail.com>)
Список 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@postgresql.org>
Date:   Mon Oct 25 11:51:57 2021 -0400

    Report progress of startup operations that take a long time.

[2] https://www.postgresql.org/message-id/CALj2ACWeUFhhnDJKm6R5YxCsF4K7aB2pmRMvqP0BVTxdyce3EA%40mail.gmail.com

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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: Skip partition tuple routing with constant partition key
Следующее
От: Richard Guo
Дата:
Сообщение: Re: Typo in pg_db_role_setting.h