From: | bt22kawamotok <bt22kawamotok(at)oss(dot)nttdata(dot)com> |
---|---|
To: | "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Query Jumbling for CALL and SET utility statements |
Date: | 2022-09-13 02:43:52 |
Message-ID: | 88c16ab86e915ea8a33d3b62522f5537@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Attached v5 to normalize 2PC commands too, so that we get things like:
>
>
> create table test_tx (a int);
> begin;
> prepare transaction 'tx1';
> insert into test_tx values (1);
> commit prepared 'tx1';
> begin;
> prepare transaction 'tx2';
> insert into test_tx values (2);
> commit prepared 'tx2';
> begin;
> prepare transaction 'tx3';
> insert into test_tx values (3);
> rollback prepared 'tx3';
> begin;
> prepare transaction 'tx4';
> insert into test_tx values (4);
> rollback prepared 'tx4';
> SELECT query, calls, rows FROM pg_stat_statements ORDER BY query
> COLLATE "C";
> query
> | calls | rows
> ------------------------------------------------------------------------------+-------+------
> SELECT pg_stat_statements_reset()
> | 1 | 1
> SELECT query, calls, rows FROM pg_stat_statements ORDER BY query
> COLLATE "C" | 0 | 0
> begin
> | 4 | 0
> commit prepared $1
> | 2 | 0
> create table test_tx (a int)
> | 1 | 0
> insert into test_tx values ($1)
> | 4 | 4
> prepare transaction $1
> | 4 | 0
> rollback prepared $1
> | 2 | 0
> (8 rows)
>
> For those ones I also had to do some minor changes in gram.y and to
> the TransactionStmt struct to record the gid location.
Thanks Bertrand.
I used your patch. It's looks very good.
I found that utility statement is counted separately in upper and lower
case.
For example BEGIN and begin are counted separately.
Is it difficult to fix this problem?
Regards,
Kotaro Kawamoto
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2022-09-13 03:17:29 | Re: cataloguing NOT NULL constraints |
Previous Message | Justin Pryzby | 2022-09-13 02:13:11 | Re: Background writer and checkpointer in crash recovery |