Re: foreign_key test is sensitive to the OID counter

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: foreign_key test is sensitive to the OID counter
Date: 2026-09-02 00:56:38
Message-ID: CAMbWs4_3RbmQ5aydCDKedcdfOUhSYxanvWbJfA9ooD_REQ8zdQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 1, 2026 at 11:48 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> This is only somewhat less bogus, though: it'd still fail at OID
> wraparound. How about sorting by the constraint name?

Good point. I didn't take OID wraparound into consideration. I think
sorting by conname works, as the connames are unique within each of
these queries.

I noticed that several other test files use COLLATE "C" when sorting
by names, so that the order is independent of the database's default
collation. So I end up using ORDER BY conname COLLATE "C" in v2.

- Richard

Attachment Content-Type Size
v2-0001-Fix-OID-counter-sensitive-row-ordering-in-foreign.patch application/octet-stream 12.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2026-09-02 01:03:33 Re: foreign_key test is sensitive to the OID counter
Previous Message Chao Li 2026-09-02 00:39:42 Fix a typo in EnableLogicalDecoding()