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

From Robert Haas
Subject [HACKERS] 64-bit queryId?
Date
Msg-id CA+TgmobG_Kp4cBKFmsznUAaM1GWW6hhRNiZC0KjRMOOeYnz5Yw@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] 64-bit queryId?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Our Query currently has space for a 32-bit queryId, but that seems
reasonably likely to result in collisions:

https://en.wikipedia.org/wiki/Birthday_problem#Probability_table

If you have as many as 50,000 queries, there's a 25% probability of
having at least one collision; that doesn't seem particularly
unrealistic.  Obviously, normalization reduces the number of distinct
queries a lot, but if queries are dynamically generated you might
still have quite a few of them.

How about widening the value to uint64?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
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: Peter Geoghegan
Date:
Subject: Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47language tags. Should it?
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Parallel Append implementation