How Postgres 19 checks foreign keys without running SQL
Postgres 19 skips the SQL layer when it checks a foreign key, and bulk inserts get about 1.7x faster. I read the code, benchmarked 18.6 against 19, and found out why the batching on top of it only helps some workloads.
