Re: Add comment explaining why queryid is int64 in pg_stat_statements
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, Lukas Fittl <lukas@fittl.com>, Shaik Mohammad Mujeeb <mujeeb.sk@zohocorp.com>, ilyaevdokimov <ilya.evdokimov@tantorlabs.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, mujeebskdev <mujeeb.sk.dev@gmail.com>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>, Alvaro Herrera <alvherre@kurilemu.de>, Tomas Vondra <tomas@vondra.me>, Nathan Bossart <nathandbossart@gmail.com>
Date: 2025-05-22T04:01:14Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Change internal plan ID type from uint64 to int64
- e050af28686e 18.0 landed
-
Change internal queryid type from uint64 to int64
- c3eda50b0648 18.0 landed
-
pg_stat_statements: Widen query IDs from 32 bits to 64 bits.
- cff440d36869 11.0 cited
On Thu, May 22, 2025 at 02:36:38PM +1200, David Rowley wrote: > You could argue that if it reduces the locations that need to be > changed by using a typedef, then it's a win. But there are also > negative aspects to typedefs that need to be considered. For me, those > are the added level of indirection of code reading to actually who > what type I'm working with. I personally dislike typedefs like > "typedef PageHeaderData *PageHeader;" as they hide the fact I'm > working with a pointer. > > I'm not outright objecting to the typedef for this. It's just I don't > see it as a clear-cut improvement for this case. Same opinion here. I am not quite clear what there is to gain in hiding the query ID behind a typedef, or even apply that to the plan ID. I have added an open item about the plan ID part as it applies to v18, adding the RMT in CC to get an opinion. If we cannot get a consensus on all that, letting things as they are is still logically correct, even with the -Wwarnings-format-signedness argument which is not included by default currently. Has somebody an opinion to offer? -- Michael