Re: Logical replication without a Primary Key - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: Logical replication without a Primary Key
Date
Msg-id 5b854760-6243-9d75-4614-88ee34e15854@anastigmatix.net
Whole thread Raw
In response to Re: Logical replication without a Primary Key  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: Logical replication without a Primary Key  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 12/07/2017 02:38 PM, Joshua D. Drake wrote:

> A    B   C
> foo,bar,baz
> foo,bar,baz
> 
> And then I say:
> 
> UPDATE test set A = 1 where C = baz
> 
> I have updated two rows because there is no primary key to identify the
> differences. Both of those rows should be updated and thus replicated

Would the subscriber see two records reporting update of a
foo,bar,baz row to 1, so it would do that to (arbitrarily)
one of them the first time, and (necessarily) the other, the
second time?

Or is that not the way it would work?

-Chap


pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] CUBE seems a bit confused about ORDER BY
Next
From: Andres Freund
Date:
Subject: Re: Signals in a BGW