Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ks7Yf-00019Y-2S for pgsql-admin@arkaria.postgresql.org; Wed, 23 Dec 2020 17:04:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ks7Yb-0006ce-3Z for pgsql-admin@arkaria.postgresql.org; Wed, 23 Dec 2020 17:04:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ks7Ya-0006cQ-Gh for pgsql-admin@lists.postgresql.org; Wed, 23 Dec 2020 17:04:12 +0000 Received: from resqmta-ch2-05v.sys.comcast.net ([2001:558:fe21:29:69:252:207:37]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ks7YT-000439-QB for pgsql-admin@lists.postgresql.org; Wed, 23 Dec 2020 17:04:11 +0000 Received: from resomta-ch2-04v.sys.comcast.net ([69.252.207.100]) by resqmta-ch2-05v.sys.comcast.net with ESMTP id s4hZkQUlneyBns7YQknYSj; Wed, 23 Dec 2020 17:04:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1608743042; bh=ZxCXyfJ/9eXDE72EUN9J8UeWRoInad7hndI0R2HrOUI=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=nysF7Yjj0ZWbiFQlZwFlpU6rWfAD2m3kGjSFIHowZK1aonVqEoZcapgDelqTeFWeV XdZkYyrVDyOKbS7Wb6DQ8g2qMMN8rAXl3EiM1Rf/5PUbFhJENNVjVszJhnHnVTmBel B+3w4pn8Vvf4NZmigsZTzeNayW88MwHl15932yob8kfhdHYsr7xAWv/vIJZLqLj7mg exZrorGhC4K0G/NmUV6xMdfm0/NYYHUXmIWShR8hsQsZexuswVpM6GTtJMxJkfXidj 3hFr2JPgwx2FZouNpBVol8gY1h9urHixKFo/ECx9lEV0pAhzuS1ojIRCSdn66u32A0 CIcfZI5s64p2g== Received: from jsievers.comcast.net ([12.30.159.20]) by resomta-ch2-04v.sys.comcast.net with ESMTPA id s7YHk3fm4yI4fs7YIkp2aM; Wed, 23 Dec 2020 17:04:00 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedujedrvddtjedgleeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedtudenucenucfjughrpefhvffufhffjgfkfgggtgfgsehtqhertddtreejnecuhfhrohhmpeflvghrrhihucfuihgvvhgvrhhsuceoghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpeevhfelgfeuudevudetvefgtdekheeggfehgeetheekkefhvdegvdehueehvdekveenucfkphepuddvrdeftddrudehledrvddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepjhhsihgvvhgvrhhsrdgtohhmtggrshhtrdhnvghtpdhinhgvthepuddvrdeftddrudehledrvddtpdhmrghilhhfrhhomhepghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtpdhrtghpthhtohephhihrghmsghusehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqrggumhhinheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-Xfinity-VMeta: sc=0.00;st=legit Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id CB0E026005A; Wed, 23 Dec 2020 11:03:52 -0600 (CST) From: Jerry Sievers To: Yambu Cc: Pgsql-admin Subject: Re: Logical replication and truncate table References: Date: Wed, 23 Dec 2020 11:03:52 -0600 In-Reply-To: (Yambu's message of "Wed, 23 Dec 2020 17:21:58 +0200") Message-ID: <87v9cslaiv.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Yambu writes: > Hello > > Please confirm this , truncate a table on master db does not work > well wilth=C2=A0logical 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? > > --=20 Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net