Re: Are Foreign Key Disabled During Logical Replication Initial Sync? - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Are Foreign Key Disabled During Logical Replication Initial Sync?
Date
Msg-id 6a957e68-9490-2cf3-e390-88cd7545251c@enterprisedb.com
Whole thread Raw
In response to Are Foreign Key Disabled During Logical Replication Initial Sync?  (Avi Weinberg <AviW@gilat.com>)
Responses RE: Are Foreign Key Disabled During Logical Replication Initial Sync?  (Avi Weinberg <AviW@gilat.com>)
List pgsql-general
On 06.12.21 15:50, Avi Weinberg wrote:
> Does it mean that populating each table is done in a single 
> transaction?  If so, when I have tables with foreign keys between them, 
> is it guaranteed that logical replication will populates the tables in 
> the proper order so the foreign key will be enforced?  Or maybe the 
> foreign keys are disabled during initial sync and only after all tables 
> are populated the FKs are enabled again.

Foreign keys are disabled on logical replication subscribers.




pgsql-general by date:

Previous
From: Mladen Gogala
Date:
Subject: Re: Query planner issue with preferring primary key over a better index when using ORDER BY and LIMIT
Next
From: Nick Cleaton
Date:
Subject: Re: Advice on using materialized views