Allow pg_read_all_stats to read pg_stat_progress_*

Поиск
Список
Период
Сортировка
От Andrey M. Borodin
Тема Allow pg_read_all_stats to read pg_stat_progress_*
Дата
Msg-id 13145F2F-8458-4977-9D2D-7B2E862E5722@yandex-team.ru
обсуждение исходный текст
Ответы Re: Allow pg_read_all_stats to read pg_stat_progress_*
Список pgsql-hackers
Hi!

One of our users asked me why they cannot read details of pg_stat_progress_vacuum while they have pg_read_all_stats
role.
Maybe I'm missing something, but I think they should be able to read stats...

PFA fix.
This affects pg_stat_progress_analyze, pg_stat_progress_basebackup, pg_stat_progress_cluster,
pg_stat_progress_create_indexand pg_stat_progress_vacuum. 

With patch
postgres=# set role pg_read_all_stats ;
postgres=> select * from pg_stat_progress_vacuum ;
  pid  | datid | datname  | relid |     phase     | heap_blks_total | heap_blks_scanned | heap_blks_vacuumed |
index_vacuum_count| max_dead_tuples | num_dead_tuples  

-------+-------+----------+-------+---------------+-----------------+-------------------+--------------------+--------------------+-----------------+-----------------
 76331 | 12923 | postgres |  1247 | scanning heap |              10 |                 1 |                  0 |
       0 |            2910 |               0 
(1 row)

Without patch
postgres=# set role pg_read_all_stats  ;
SET
postgres=> select * from pg_stat_progress_vacuum ;
  pid  | datid | datname  | relid | phase | heap_blks_total | heap_blks_scanned | heap_blks_vacuumed |
index_vacuum_count| max_dead_tuples | num_dead_tuples  

-------+-------+----------+-------+-------+-----------------+-------------------+--------------------+--------------------+-----------------+-----------------
 76331 | 12923 | postgres |       |       |                 |                   |                    |
 |                 |                 
(1 row)

Thanks!

Best regards, Andrey Borodin.


Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [patch] some PQExpBuffer are not destroyed in pg_dump
Следующее
От: David Rowley
Дата:
Сообщение: Parallel Append can break run-time partition pruning