[PATCH v1] Add pg_stat_progress overview view

Started by Josef Šimánek16 days ago2 messageshackers
Jump to latest
#1Josef Šimánek
josef.simanek@gmail.com

Hi,

finding active progress reports currently requires querying each
pg_stat_progress_* view separately.

This patch adds pg_stat_progress with three columns: pid, command, and
progress_view, pointing to the detailed view for each operation. It
reuses the existing infrastructure without backend changes. IMHO,
these are the minimal common fields. I also considered datid and
datname, but some tracked operations, such as base backups, cover the
whole cluster.

Documentation and tests are included. Build, regression, isolation,
and new TAP tests passed locally.

I'd appreciate feedback on the usefulness and proposed columns. My
longer-term aim is to make cluster operations easier to discover and
monitor, and to extend progress reporting to more commands.

Regards,
Josef

Attachments:

t254620_1
v1-0001-Add-pg_stat_progress-overview-view.patchtext/x-patch; charset=US-ASCII; name=v1-0001-Add-pg_stat_progress-overview-view.patchDownload+266-1
#2Sami Imseih
samimseih.pg@gmail.com
In reply to: Josef Šimánek (#1)
Re: [PATCH v1] Add pg_stat_progress overview view

Hi Josef,

finding active progress reports currently requires querying each
pg_stat_progress_* view separately.

Thanks for the patch. I looked through it, but I'm having trouble
seeing the use case. Since the view only exposes pid, command, and
the name of the detailed view, a monitoring tool would still need to
query that specific view to get anything actionable.

Could you share some real-world scenarios where this would be useful?

--
Sami