Use two-pass inserts for cyclic non-deferrable foreign keys
When two tables reference each other through non-deferrable foreign keys, backfill in two passes: insert the first table with its circular reference null, insert the referenced rows, then update the first table. Preserve parent-before-child order for every other dependency. Larg…