Re: BUG: PostgreSQL 19devel throws internal opfamily error for FK with reordered referenced columns

Matheus Alcantara <matheusssilv97@gmail.com>

From: Matheus Alcantara <matheusssilv97@gmail.com>
To: Amit Langote <amitlangote09@gmail.com>, Junwang Zhao <zhjwpku@gmail.com>, Fredrik Widlert <fredrik.widlert@digpro.se>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2026-04-10T12:42:56Z
Lists: pgsql-bugs
On 10/04/26 01:42, Amit Langote wrote:
> 
> Thanks Junwang for checking.  I've just pushed this: 980c1a85d819.
> 
> Thanks Matheus again for the quick patch and Fredrik for the report.
> 

Thank you for everyone.

--
Matheus Alcantara
EDB: https://www.enterprisedb.com



Commits

  1. Add test case for same-type reordered FK columns

  2. Assert index_attnos[0] == 1 in ri_FastPathFlushArray()

  3. Fix FK fast-path scan key ordering for mismatched column order

  4. Add fast path for foreign key constraint checks