Re: Logical replication without a Primary Key

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, 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-18 20:57:02
Message-ID: bd94f7f3-afd2-0bb0-f886-239773c4e2ad@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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. *****

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2017-12-18 21:23:12 Re: Logical replication without a Primary Key
Previous Message Andres Freund 2017-12-18 20:52:55 Re: Logical replication without a Primary Key