Re: Logical replication without a Primary Key

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Logical replication without a Primary Key
Дата
Msg-id CAMsr+YGoCo3PKvFp9Q7Qrct3wHoNWRCK4e8U9pAxLevcGjS0cQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Logical replication without a Primary Key  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-hackers
On 7 December 2017 at 22:32, Joshua D. Drake <jd@commandprompt.com> wrote:

The confusion I have is what if we have two rows that are identical and now that I think about it we would just update both rows, yes? That would make sense because it would produce two updated rows.


I expect so, but honestly, maybe it's easier to just add a pg_regress test to check and demonstrate the behaviour, or do a manual test?

(a pg_regress test would make sense to add anyway, though, and might be easier)

The only ways you could update only one of two identical rows would be if you did so by ctid (since if it were a table with oids, the rows wouldn't be identical anymore). It'd make no sense to send the ctid to the downstream since it'd bear no relationship to the downstream table. I expect it'd probably update both rows. If it doesn't, it probably should.

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

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Logical replication without a Primary Key
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: Logical replication without a Primary Key