Re: pg_stat_statements: calls under-estimation propagation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Sameer Thakur <samthakur74(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_stat_statements: calls under-estimation propagation
Date: 2013-12-06 20:24:13
Message-ID: 18287.1386361453@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii Masao <masao(dot)fujii(at)gmail(dot)com> writes:
> On Sun, Nov 24, 2013 at 10:58 AM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
>> I decided that queryid should be of type oid, not bigint. This is
>> arguably a slight abuse of notation, but since ultimately Oids are
>> just abstract object identifiers (so say the docs), but also because
>> there is no other convenient, minimal way of representing unsigned
>> 32-bit integers in the view that I'm aware of, I'm inclined to think
>> that it's appropriate.

> There seems to be no problem even if we use bigint as the type of
> unsigned 32-bit integer like queryid. For example, txid_current()
> returns the transaction ID, i.e., unsigned 32-bit integer, as bigint.
> Could you tell me what the problem is when using bigint for queryid?

We're talking about the output of some view, right, not internal storage?
+1 for using bigint for that. Using OID is definitely an abuse, because
the value *isn't* an OID. And besides, what if we someday decide we need
64-bit keys not 32-bit?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2013-12-06 21:04:10 Re: Reference to parent query from ANY sublink
Previous Message Tom Lane 2013-12-06 20:21:48 Re: WITHIN GROUP patch