add column (query_start timestamptz) to progress report views

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: add column (query_start timestamptz) to progress report views
Date: 2025-06-09 11:34:48
Message-ID: CACJufxF03CY=kz6dP+QrHWjGwzGMAiF-X7bccAQt_x2Xm1GL_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.

for all the progress report views[1],
we can add a timestamptz column, maybe named as query_start.

People generally want to track the progress of operations and the time spent on
them. While pg_stat_activity already provides column query_start, including
query_start in pg_stat_get_progress_info would eliminate the need
for JOIN with pg_stat_activity in some cases.
Overall it will make the progress report monitoring more convenient, IMHO.

as of implementation: we can occupy pg_stat_get_progress_info last parameter
param20 for column query_start.

what do you think?

[1]: https://www.postgresql.org/docs/current/progress-reporting.html#COPY-PROGRESS-REPORTING
[2] https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW

Browse pgsql-hackers by date

  From Date Subject
Next Message Mihail Nikalayeu 2025-06-09 12:47:18 Re: strange perf regression with data checksums
Previous Message Fujii Masao 2025-06-09 11:15:51 Re: Missing program_XXX calling in pgbench tests