From: | kuroda(dot)keisuke(at)nttcom(dot)co(dot)jp |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Add privileges test for pg_stat_statements to improve coverage |
Date: | 2024-07-23 00:26:02 |
Message-ID: | 488263fb2634162199affe740e07a407@nttcom.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
Attachment | Content-Type | Size |
---|---|---|
V3_add_privileges_test_for_pg_stat_statements.patch | text/x-diff | 5.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-07-23 00:37:14 | Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin |
Previous Message | Michael Paquier | 2024-07-23 00:25:04 | Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin |