Re: Add privileges test for pg_stat_statements to improve coverage

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Add privileges test for pg_stat_statements to improve coverage
Дата
Msg-id aaa8caa6-7f1f-4178-8067-010515d2c158@oss.nttdata.com
обсуждение исходный текст
Ответ на Add privileges test for pg_stat_statements to improve coverage  (kuroda.keisuke@nttcom.co.jp)
Ответы Re: Add privileges test for pg_stat_statements to improve coverage
Список pgsql-hackers

On 2024/04/23 15:44, kuroda.keisuke@nttcom.co.jp wrote:
> Hi hackers,
> 
> I proposal adding privileges test to improve
> test coverage of pg_stat_statements.

+1

Here are the review comments:

meson.build needs to be updated as well, like the Makefile.


For the privileges test, should we explicitly set pg_stat_statements.track_utility
at the start, as done in other pg_stat_statements tests, to make sure
if utility command statistics are collected or not?


+SELECT
+  CASE
+    WHEN queryid <> 0 THEN TRUE ELSE FALSE
+  END AS queryid_bool
+  ,query FROM pg_stat_statements ORDER BY query COLLATE "C";

Can't we simplify "CASE ... END" to just "queryid <> 0"?


Should the test check not only queryid and query but also
the statistics column like "calls"? Roles that aren't superusers
or pg_read_all_stats should be able to see statistics but not
query or queryid. So we should test that such roles can't see
query or queryid but can see statistics. Thoughts?

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: [18] Policy on IMMUTABLE functions and Unicode updates
Следующее
От: Alena Rybakina
Дата:
Сообщение: Re: Evaluate arguments of correlated SubPlans in the referencing ExprState