Re: [HACKERS] REPLICA IDENTITY FULL

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: [HACKERS] REPLICA IDENTITY FULL
Дата
Msg-id CAMsr+YHfX3vpm=1pVSxRbQH4Cx8DjqkD066XvFFi6Ex9Ssh--w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] REPLICA IDENTITY FULL  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] REPLICA IDENTITY FULL  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 20 June 2017 at 06:53, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 6/18/17 23:11, Tatsuo Ishii wrote:
>> While playing around with logical replication, I am confused by the
>> behavior of REPLICA IDENTITY FULL.
>
>> However, if a table has text columns, UPDATE/DELETE replication does
>> not work any more. Am I missing something?
>
> This is apparently because for replica identity full the comparison of
> the search key against the tuple value goes through datumIsEqual(),
> which doesn't work for TOAST values.

Personally I think REPLICA IDENTITY FULL conflates two related things.

One is "record the whole old value of the tuple in xlog so logical
decoding can access it".

Quite separately, there is "treat the full tuple as the replica identity key".

I frequently want to be able to use REPLICA IDENTITY DEFAULT, but also
record the whole old tuple not just keys, so they can be used in
conflict processing etc.


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



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] PATCH: Batch/pipelining support for libpq
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Get stuck when dropping a subscription duringsynchronizing table