News for hackers. Stuff that matters.
Re:We do not use foreign keys (2016) by shawnz on Friday November 08, 2019 @04:14PM (#21486842)
So then don't do it inside a transaction. It still wouldn't be any less safe than their current approach of just not using FKs at all
Re:We do not use foreign keys (2016) by evanelias on Friday November 08, 2019 @05:43PM (#21487703)
Adding a foreign key to a massive table can take a long time, since all existing row data must be validated against the constraint. With logical replication, long operations like this can be quite disruptive, even with a multi-threaded logical replication scheme.