public inbox for [email protected]  
help / color / mirror / Atom feed
Re: Test cluster with high OIDs above the signed-int limit (2B+)
3+ messages / 2 participants
[nested] [flat]

* Re: Test cluster with high OIDs above the signed-int limit (2B+)
@ 2026-04-20 13:08 Dominique Devienne <[email protected]>
  2026-04-20 13:22 ` Re: Test cluster with high OIDs above the signed-int limit (2B+) Ron Johnson <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Dominique Devienne @ 2026-04-20 13:08 UTC (permalink / raw)
  To: Ron Johnson <[email protected]>; +Cc: pgsql-general

On Mon, Apr 20, 2026 at 2:59 PM Dominique Devienne <[email protected]> wrote:
> No. I don't even remember the exact bug

Was an old test using lo_creat(-1) RETURNING the OID, and code doing
`std::stoi(PQgetvalue(...))`. In production we don't use LO and use
the binary protocol, so no such issue, still my original point
remains. We process OIDs in several places, and making sure our test
suite works with high OIDs would be better. If I fully control the
cluster, which is created specifically for the test run, on-the-fly,
it's like to be able to similate high OIDs "instantly".






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Test cluster with high OIDs above the signed-int limit (2B+)
  2026-04-20 13:08 Re: Test cluster with high OIDs above the signed-int limit (2B+) Dominique Devienne <[email protected]>
@ 2026-04-20 13:22 ` Ron Johnson <[email protected]>
  2026-04-20 13:30   ` Re: Test cluster with high OIDs above the signed-int limit (2B+) Dominique Devienne <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Ron Johnson @ 2026-04-20 13:22 UTC (permalink / raw)
  To: pgsql-general

On Mon, Apr 20, 2026 at 9:08 AM Dominique Devienne <[email protected]>
wrote:

> On Mon, Apr 20, 2026 at 2:59 PM Dominique Devienne <[email protected]>
> wrote:
> > No. I don't even remember the exact bug
>
> Was an old test using lo_creat(-1) RETURNING the OID, and code doing
> `std::stoi(PQgetvalue(...))`. In production we don't use LO and use
> the binary protocol, so no such issue, still my original point
> remains. We process OIDs in several places, and making sure our test
> suite works with high OIDs would be better. If I fully control the
> cluster, which is created specifically for the test run, on-the-fly,
> it's like to be able to similate high OIDs "instantly".
>

It's an unsigned integer, so I'd say not use signed ints when processing
OIDs.

It's a valid question, though, what happens when the OID counter wraps
around and hits a duplicate.

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Test cluster with high OIDs above the signed-int limit (2B+)
  2026-04-20 13:08 Re: Test cluster with high OIDs above the signed-int limit (2B+) Dominique Devienne <[email protected]>
  2026-04-20 13:22 ` Re: Test cluster with high OIDs above the signed-int limit (2B+) Ron Johnson <[email protected]>
@ 2026-04-20 13:30   ` Dominique Devienne <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Dominique Devienne @ 2026-04-20 13:30 UTC (permalink / raw)
  To: Ron Johnson <[email protected]>; +Cc: pgsql-general

On Mon, Apr 20, 2026 at 3:23 PM Ron Johnson <[email protected]> wrote:
> It's an unsigned integer, so I'd say not use signed ints when processing OIDs.

Well duh, that's why it's a bug.
But it's a sneaky bug, because clusters rarely enter that high-OID territory.
That's precisely why I'd like a way to provoke it.

> It's a valid question, though, what happens when the OID counter wraps around and hits a duplicate.

Again, I'm NOT interested in OID wrap-around. But the "second-half" of
the OID space.






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-04-20 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-04-20 13:08 Re: Test cluster with high OIDs above the signed-int limit (2B+) Dominique Devienne <[email protected]>
2026-04-20 13:22 ` Ron Johnson <[email protected]>
2026-04-20 13:30   ` Dominique Devienne <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox