Re: 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
Дата
Msg-id 488263fb2634162199affe740e07a407@nttcom.co.jp
обсуждение исходный текст
Ответ на Re: Add privileges test for pg_stat_statements to improve coverage  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers
Hi Fujii-san,
Thank you for your reply and comment!

attach v3 fixed patch.

> Shouldn't we also include calls and rows in the ORDER BY clause?
> Without this, if there are multiple records with the same query
> but different calls or rows, the query result might be unstable.
> I believe this is causing the test failure reported by
> he PostgreSQL Patch Tester.

> I was thinking of adding "queryid <> 0" in the SELECT clause
> instead of the WHERE clause. This way, we can verify if
> the query results are as expected regardless of the queryid value,
> including both queryid <> 0 and queryid = 0.

It's exactly as you said.
* Add calls and rows in the ORDER BY caluse.
* Modify "queryid <> 0" in the SELECT clause.
Modify test SQL belows, and the regress_stats_user1 check SQL
only needs to be done once.

+SELECT queryid <> 0 AS queryid_bool, query, calls, rows
+  FROM pg_stat_statements
+  ORDER BY query COLLATE "C", calls, rows;

Best Regards,
Keisuke Kuroda
NTT Comware
Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin