Re: Conflict detection for update_deleted in logical replication

Поиск
Список
Период
Сортировка
От Nisha Moond
Тема Re: Conflict detection for update_deleted in logical replication
Дата
Msg-id CABdArM6R3Ag2yd_tg0Ad41Ys9zs+1LeT5-hwt4v4btya-yfYDw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Conflict detection for update_deleted in logical replication  (shveta malik <shveta.malik@gmail.com>)
Ответы Re: Conflict detection for update_deleted in logical replication
Список pgsql-hackers
> Here is the V5 patch set which addressed above comments.
>
Here are a couple of comments on v5 patch-set -

1) In FindMostRecentlyDeletedTupleInfo(),

+ /* Try to find the tuple */
+ while (index_getnext_slot(scan, ForwardScanDirection, scanslot))
+ {
+ Assert(tuples_equal(scanslot, searchslot, eq));
+ update_recent_dead_tuple_info(scanslot, oldestXmin, delete_xid,
+   delete_time, delete_origin);
+ }

In my tests, I found that the above assert() triggers during
unidirectional replication of an update on a table. While doing the
replica identity index scan, it can only ensure to match the indexed
columns value, but the current Assert() assumes all the column values
should match, which seems wrong.

2) Since update_deleted requires both 'track_commit_timestamp' and the
'detect_update_deleted' to be enabled, should we raise an error in the
CREATE and ALTER subscription commands when track_commit_timestamp=OFF
but the user specifies detect_update_deleted=true?



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