mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +03:00
Add started_by column to pg_stat_progress_analyze view.
The new column, started_by, indicates the initiator of the
analyze ('manual' or 'autovacuum'), helping users and monitoring tools
to better understand ANALYZE behavior.
Bump catalog version.
Author: Shinya Kato <shinya11.kato@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Reviewed-by: Yu Wang <wangyu_runtime@163.com>
Discussion: https://postgr.es/m/CAA5RZ0suoicwxFeK_eDkUrzF7s0BVTaE7M%2BehCpYcCk5wiECpw%40mail.gmail.com
This commit is contained in:
@@ -1969,7 +1969,12 @@ pg_stat_progress_analyze| SELECT s.pid,
|
||||
s.param6 AS child_tables_total,
|
||||
s.param7 AS child_tables_done,
|
||||
(s.param8)::oid AS current_child_table_relid,
|
||||
((s.param9)::double precision / (1000000)::double precision) AS delay_time
|
||||
((s.param9)::double precision / (1000000)::double precision) AS delay_time,
|
||||
CASE s.param10
|
||||
WHEN 1 THEN 'manual'::text
|
||||
WHEN 2 THEN 'autovacuum'::text
|
||||
ELSE NULL::text
|
||||
END AS started_by
|
||||
FROM (pg_stat_get_progress_info('ANALYZE'::text) s(pid, datid, relid, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20)
|
||||
LEFT JOIN pg_database d ON ((s.datid = d.oid)));
|
||||
pg_stat_progress_basebackup| SELECT pid,
|
||||
|
||||
Reference in New Issue
Block a user