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

From Joshua D. Drake
Subject Re: Logical replication without a Primary Key
Date
Msg-id bd94f7f3-afd2-0bb0-f886-239773c4e2ad@commandprompt.com
Whole thread Raw
In response to Re: Logical replication without a Primary Key  (Andres Freund <andres@anarazel.de>)
Responses Re: Logical replication without a Primary Key  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
List pgsql-hackers
On 12/18/2017 12:52 PM, Andres Freund wrote:
>
> Just ot make sure: You're saying there's no problem here, and that
> logical rep is behaving correctly, right?

Correct. I am not sure where the miscommunication was (fully willing to 
accept it was on my side) but if I update multiple rows in a single 
statement, all the rows that were modified get replicated. That is the 
behavior I would have expected.

> FWIW, I wonder if we need to add a warning somewhere about FULL
> replication, given it's essentially O(#changes * #rows) -> O(n^2) for
> updating the whole table.

The docs do mention it is a performance hit but something a little more 
"IF YOU DO THIS, BEWARE" may be good.

Thanks,

JD

-- 
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc

PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
*****     Unless otherwise stated, opinions are my own.   *****



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Logical replication without a Primary Key
Next
From: Petr Jelinek
Date:
Subject: Re: Logical replication without a Primary Key