Re: Logical replication can be broken by domain constraint with NOTVALID option

Поиск
Список
Период
Сортировка
От Andrey Lepikhov
Тема Re: Logical replication can be broken by domain constraint with NOTVALID option
Дата
Msg-id 5e443723-b8d0-128c-bf21-1bc1e1db3c48@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Logical replication can be broken by domain constraint with NOTVALID option  (Euler Taveira <euler@timbira.com.br>)
Список pgsql-bugs

On 05/11/2019 20:21, Euler Taveira wrote:
> Em dom., 3 de nov. de 2019 às 23:33, Andrey Lepikhov
> <a.lepikhov@postgrespro.ru> escreveu:
>> If this is the only reason, I propose a new version of the patch (see in
>> attachment). It is satisfy the "Paranoid safety" rule.
> I don't think that is acceptable either. If you have different schemas
> (even for a small period of time), you should handle it dropping and
> recreating the constraints.

Changing schema is a big deal. But adding a constraint with "not valid" 
option can be used frequently. May be for change phone numbers format, 
for example.

> Logical replication is far from a complete
> feature. There should be cases that someone wants to enforce even the
> FK constraints in the subscriber. I certainly wouldn't like to open
> that can of worms. Relaxing constraints could lead to inconsistent
> datasets across nodes. If you want to accept constraint violation,
> drop the constraints.

May be logical replication is incomplete. But it is no argument to not 
fix an errors that we found.
In v2 version of the patch constraints are suppressed only for old 
version of the tuple that used for search in the heap and can't be 
applied. In this sense we do not relaxing any constraints.

-- 
Andrey Lepikhov
Postgres Professional
https://postgrespro.com
The Russian Postgres Company



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16095: Segfault while executing trigger
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #16095: Segfault while executing trigger