From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Logical replication without a Primary Key |
Date: | 2017-12-07 14:38:41 |
Message-ID: | CAMsr+YGoCo3PKvFp9Q7Qrct3wHoNWRCK4e8U9pAxLevcGjS0cQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 7 December 2017 at 22:32, Joshua D. Drake <jd(at)commandprompt(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Jelinek | 2017-12-07 14:43:08 | Re: Logical replication without a Primary Key |
Previous Message | David G. Johnston | 2017-12-07 14:37:17 | Re: Logical replication without a Primary Key |