3 ms·
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
by shawnz 7y ago
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
- evanelias 7y agoAdding 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.