Re: Logical replication and truncate table - Mailing list pgsql-admin

From Yambu
Subject Re: Logical replication and truncate table
Date
Msg-id CALhHtcCNpJBSJuX2TM15Czk0TJx3BRgzbXRt-CM58XS+Lh0+mA@mail.gmail.com
Whole thread Raw
In response to Re: Logical replication and truncate table  (Jerry Sievers <gsievers19@comcast.net>)
Responses Re: Logical replication and truncate table  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-admin
Hi

We are using Pg V10 , streaming , async 

On Wed, Dec 23, 2020 at 7:04 PM Jerry Sievers <gsievers19@comcast.net> wrote:
Yambu <hyambu@gmail.com> writes:

> Hello
>
> Please confirm this , truncate a table on master db does not work
> well wilth logical replication?
> It results in duplicate key errors on slave right?

Trunc has been supported in native logical replication since V11.

Start by telling us what Pg version you're on and what logical
replication your using.

See the docs.
>
> We should rather use delete from table?
>
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net

pgsql-admin by date:

Previous
From: Jerry Sievers
Date:
Subject: Re: Logical replication and truncate table
Next
From: Devrim Gündüz
Date:
Subject: Re: Pg_upgrade issue