| From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
|---|---|
| To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: RI fast path gets cross-type foreign keys wrong |
| Date: | 2026-08-01 03:19:46 |
| Message-ID: | CA+HiwqFAMoRFEna5hZAyeqqBrf75mAPyp4UKsEuzQvUrrg6=5w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, Aug 1, 2026 at 8:33 Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> The attached isolation test patch (written by Claude code) shows that
> the new RI fast path can get some things wrong when a foreign key uses
> a cross-type equality operator.
>
> The test has two permutations differing only in the primary key's type
> -- date against a timestamp FK in the first, timestamp against
> timestamp in the second. The interleaving is identical and the
> referenced key is present throughout, so both should behave the same
> way. The second succeeds (which is correct), while the first fails
> with a foreign key violation (which is incorrect).
>
> The fast path was introduced by b7b27eb41. This is an issue on 19 and
> master only.
Thanks Peter for the report. I’m on vacation atm, will take a look when I
get back next week.
- Amit
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2026-08-01 05:42:30 | Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation |
| Previous Message | Peter Geoghegan | 2026-08-01 03:03:22 | RI fast path gets cross-type foreign keys wrong |