Re: Are Foreign Key Disabled During Logical Replication Initial Sync?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Are Foreign Key Disabled During Logical Replication Initial Sync?
Дата
Msg-id 37798fc0-d990-e531-f171-80e79f8f1c87@enterprisedb.com
обсуждение исходный текст
Ответ на RE: Are Foreign Key Disabled During Logical Replication Initial Sync?  (Avi Weinberg <AviW@gilat.com>)
Список pgsql-general
On 07.12.21 08:51, Avi Weinberg wrote:
> Just to clarify, they are disabled during initial sync only or are always disabled on subscriber side?
> Are all triggers disabled during initial sync or just foreign keys?

All triggers are by default disabled on replicas.  See the ALTER TABLE 
clauses DISABLE/ENABLE [ REPLICA | ALWAYS ] TRIGGER to change this.

> How can I know that initial sync completed for all tables?  Is it checking when pg_subscription_rel.srsubstate is 'i'
or'd' for all tables or there is a better way?
 

There are various ways to phrase this.  The test suite often uses this 
query:

SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN 
('r', 's');



В списке pgsql-general по дате отправления:

Предыдущее
От: Vikas Sharma
Дата:
Сообщение: Re: how to get value of parameter set in session for other user
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: error connecting to pgbouncer admin console