Re: Logical replication without a Primary Key

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Logical replication without a Primary Key
Date: 2017-12-07 20:19:56
Message-ID: CA+TgmoYYKaqR6mPVEwS1Pb4v=BrOg1dVk2a606vev8JjzoagrQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 7, 2017 at 2:53 PM, Chapman Flack <chap(at)anastigmatix(dot)net> wrote:
> 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?

Exactly.

(I think.)

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2017-12-07 20:21:22 Re: plpgsql test layout
Previous Message Andres Freund 2017-12-07 20:17:06 Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple