Re: [HACKERS] 64-bit queryId? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] 64-bit queryId?
Date
Msg-id 555.1506979950@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] 64-bit queryId?  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: [HACKERS] 64-bit queryId?
List pgsql-hackers
Peter Geoghegan <pg@bowt.ie> writes:
> You need to change the SQL interface as well, although I'm not sure
> exactly how. The problem is that you are now passing a uint64 queryId
> to Int64GetDatumFast() within pg_stat_statements_internal(). That
> worked when queryId was a uint32, because you can easily represent
> values <= UINT_MAX as an int64/int8. However, you cannot represent the
> second half of the range of uint64 within a int64/int8. I think that
> this will behave different depending on USE_FLOAT8_BYVAL, if nothing
> else.

Maybe intentionally drop the high-order bit, so that it's a 63-bit ID?
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiverafter OOM
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM