Re: row filtering for logical replication

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: row filtering for logical replication
Дата
Msg-id 8c88c6ac-2d34-e577-0aa3-2a190ae0f4f7@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: row filtering for logical replication  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Ответы Re: row filtering for logical replication  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
On 23/11/2018 19:29, Fabrízio de Royes Mello wrote:
> 
> On Fri, Nov 23, 2018 at 4:13 PM Petr Jelinek
> <petr.jelinek@2ndquadrant.com <mailto:petr.jelinek@2ndquadrant.com>> wrote:
>>
>> >
>> > If carefully documented I see no problem with it... we already have an
>> > analogous problem with functional indexes.
>>
>> The difference is that with functional indexes you can recreate the
>> missing object and everything is okay again. With logical replication
>> recreating the object will not help.
>>
> 
> In this case with logical replication you should rsync the object. That
> is the price of misunderstanding / bad use of the new feature.
> 
> As usual, there are no free beer ;-)
> 

Yeah but you have to resync whole subscription, not just single table
(removing table from the publication will also not help), that's pretty
severe punishment. What if you have triggers downstream that do
calculations or logging which you can't recover by simply rebuilding
replica? I think it's better to err on the side of no data loss.

We could also try to figure out a way to recover from this that does not
require resync, ie perhaps we could somehow temporarily force evaluation
of the expression to have current snapshot.

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 64-bit hash function for hstore and citext data type
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: row filtering for logical replication