Re: Review of: pg_stat_statements with query tree normalization - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Review of: pg_stat_statements with query tree normalization
Date
Msg-id CAEYLb_W3tei2p67SGkqN1JtbMmawRHzxgK47kEc40=frwBLdzg@mail.gmail.com
Whole thread Raw
In response to Review of: pg_stat_statements with query tree normalization  (Daniel Farina <daniel@heroku.com>)
List pgsql-hackers
On 15 January 2012 11:41, Daniel Farina <daniel@heroku.com> wrote:
> I've *finally* gotten around to reviewing this patch.
>
> My first step was to de-bitrot it very slightly.  More on that in a moment.

Thanks.

> Prepared statements are less informative, unless one knows their
> naming convention:
>
> query               | execute foo;
>
> I don't know what JDBC users or ActiveRecord 3 users are going to
> think about that.  However, just about everyone else will be happy.

I should point out, though I think you might be aware of this already,
that the patch actually behaves in the same way as the existing
implementation here. It will only normalise prepared queries that are
prepared with PQprepare() or its underlying wire-protocol facility. If
you run the example in the pg_stat_statements docs, where pgbench is
passed "-M prepared", that will work just as well as before. Perhaps
it's something that the patch should be able to do. That said, it
seems pretty likely that client libraries won't be dynamically
generating SQL Prepare/Execute statements under the hood.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


pgsql-hackers by date:

Previous
From: Daniel Farina
Date:
Subject: Review of: pg_stat_statements with query tree normalization
Next
From: Peter Eisentraut
Date:
Subject: Re: exit() calls in libraries