public inbox for [email protected]
help / color / mirror / Atom feedFrom: Drouvot, Bertrand <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Postgres hackers <[email protected]>
Subject: Re: Normalization of utility queries in pg_stat_statements
Date: Thu, 2 Mar 2023 08:12:24 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <Y/7Y9U/y/[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<Y/[email protected]>
<Y/LcU/[email protected]>
<Y/7Y9U/y/[email protected]>
Hi,
On 3/1/23 5:47 AM, Michael Paquier wrote:
> On Mon, Feb 20, 2023 at 11:34:59AM +0900, Michael Paquier wrote:
>> With the patches..
>
> Attached is an updated patch set, where I have done more refactoring
> work for the regression tests of pg_stat_statements, splitting
> pg_stat_statments.sql into the following files:
> - user_activity.sql for the role-level resets.
> - wal.sql for the WAL generation tracking.
> - dml.sql for insert/update/delete/merge and row counts.
> - The main file is renamed to select.sql, as it now only covers SELECT
> patterns.
>
Thanks!
Splitting even more and removing pg_stat_statements.sql/out does make sense to me,
so +1 for the patch.
Applying 0001 produces:
Applying: Split more regression tests of pg_stat_statements
.git/rebase-apply/patch:1735: new blank line at EOF.
+
.git/rebase-apply/patch:2264: new blank line at EOF.
+
warning: 2 lines add whitespace errors.
Nits:
+++ b/contrib/pg_stat_statements/sql/wal.sql
@@ -0,0 +1,22 @@
+--
+-- Validate WAL generation metrics
+--
+
+SET pg_stat_statements.track_utility = FALSE;
+
+-- utility "create table" should not be shown
This comment is coming from the previous pg_stat_statements.sql but
I wonder if it makes sense here as testing utility is not the initial purpose
of wal.sql.
Same comment for dml.sql:
+-- utility "create table" should not be shown
+CREATE TEMP TABLE pgss_dml_tab (a int, b char(20));
What about removing those comments?
> There is no change in the code coverage or the patterns tested.
I had a look (comparing the new .sql files with the old pg_stat_statements.sql content) and I agree.
Except from the Nits above, 0001 LGTM.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (11+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Normalization of utility queries in pg_stat_statements
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox