Skip site navigation (1) Skip section navigation (2)

Hash id in pg_stat_statements

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Hash id in pg_stat_statements
Date: 2012-10-01 07:57:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Can we please expose the internal hash id of the statements in

I know there was discussions about it earlier, and it wasn't done with
an argument of it not being stable between releases (IIRC). I think we
can live with that drawback, assuming of course that we document this

I've now run into multiple customer installations where it would be
very useful to have. The usecase is mainly storing snapshots of the
pg_stat_statements output over time and analyzing those. Weird things
happen for example when the query text is the same, but the hash is
different (which can happen for example when a table is dropped and
recreated). And even without that, in order to do anything useful with
it, you end up hashing the query text anyway - so using the already
existing hash would be easier and more useful.

 Magnus Hagander


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2012-10-01 10:38:49
Subject: Re: BUG #7534: walreceiver takes long time to detect n/w breakdown
Previous:From: Dimitri FontaineDate: 2012-10-01 07:44:28
Subject: Re: [9.1] 2 bugs with extensions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group