Foreign key fast path
RI checks done by direct index probes instead of SPI, including batching and its revert.
Versions
- PostgreSQL 19 · shipped · new · major · 9 commits · +1.8k / -101 lines
- PostgreSQL 18 · worked-on · new · major
- PostgreSQL 17 · worked-on · new · major
- PostgreSQL 16 · worked-on · new · major
Threads
- BUG #19946: Caught foreign-key violations retain RI fast-path memory until transaction end
- Two more RI fast-path issues
- RI fastpath misses checking EXECUTE on functions
- PG19: two RI fast-path issues found while testing the batching revert
- Revert RI fast-path batching from REL_19_STABLE
- ri_Fast* crash w/ nullable UNIQUE constraint
- PG19 FK fast path: OOB write and missed FK checks during batched
- Re-read conindid under the referenced table's lock in the RI fast path
- InvalidateConstraintCacheCallBack() can free fpmeta while it's in use
- RI fast path gets cross-type foreign keys wrong
- In core use of RegisterXactCallback() and RegisterSubXactCallback()
- Fast-path FK checks reject valid inserts for domain-typed FK columns
- Server crash: Use-after-free in AfterTriggerEndQuery()
- Question: Should we release the FK fast-path pk_slot's buffer pin promptly?
- ri_LockPKTuple misleading message
- Eliminating SPI / SQL from some RI triggers - take 3
- BUG: PostgreSQL 19devel throws internal opfamily error for FK with reordered referenced columns
- Eliminating SPI from RI triggers - take 2
- simplifying foreign key/RI checks
- Release SPI plans for referential integrity with DISCARD ALL
- A Case For Inlining Immediate Referential Integrity Checks
- More efficient RI checks - take 2