Re: Review of: pg_stat_statements with query tree normalization

From: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
To: Daniel Farina <daniel(at)heroku(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review of: pg_stat_statements with query tree normalization
Date: 2012-01-15 12:51:39
Message-ID: CAEYLb_W3tei2p67SGkqN1JtbMmawRHzxgK47kEc40=frwBLdzg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 15 January 2012 11:41, Daniel Farina <daniel(at)heroku(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2012-01-15 12:53:32 Re: exit() calls in libraries
Previous Message Daniel Farina 2012-01-15 11:41:55 Review of: pg_stat_statements with query tree normalization