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-03 18:54:27 |
Message-ID: | CAEYLb_UacLG7ezPwrpm+8F-nmO_MEX8Sjc5YT0v=ppoQ=P4fmA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 3 October 2012 19:04, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Daniel Farina <daniel(at)heroku(dot)com> writes:
>> Instead, I think it makes sense to assign a number -- arbitrarily, but
>> uniquely -- to the generation of a new row in pg_stat_statements, and,
>> on the flip side, whenever a row is retired its number should be
>> eliminated, practically, for-ever. This way re-introductions between
>> two samplings of pg_stat_statements cannot be confused for a
>> contiguously maintained statistic on a query.
>
> 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.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2012-10-03 19:41:05 | Re: gistchoose vs. bloat |
Previous Message | Tom Lane | 2012-10-03 18:04:04 | Re: Hash id in pg_stat_statements |