From: | Peter Geoghegan <peter(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Daniel Farina <daniel(at)heroku(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Hash id in pg_stat_statements |
Date: | 2012-10-10 11:34:07 |
Message-ID: | CAEYLb_UczVJFcQzdzoMr4W=19zMTXC4_tXzjD5JA1RmJstDjbA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 3 October 2012 19:54, Peter Geoghegan <peter(at)2ndquadrant(dot)com> wrote:
> On 3 October 2012 19:04, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> This argument seems sensible to me. Is there any use-case where the
>> proposed counter wouldn't do what people wished to do with an exposed
>> hash value?
>
> Yes. The hash could be used to aggregate query execution costs across
> entire WAL-based replication clusters. I'm not opposed to Daniel's
> suggestion, though.
I failed to mention a more compelling use-case. On systems that use
roles extensively, there will naturally from time to time be a desire
to see things at the query granularity, rather than at the (userid,
queryid) granularity. Exposing the hash value allows the user to
construct an aggregate query that groups by the hash value, rather
than the query string. For all the reasons already mentioned, this is
a better principled approach than using the query string.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2012-10-10 12:33:08 | Is there a good reason why PL languages do not support cstring type arguments and return values ? |
Previous Message | Noah Misch | 2012-10-10 11:05:55 | Re: BUG #6510: A simple prompt is displayed using wrong charset |