Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVXB2-0004zF-LM for pgsql-admin@arkaria.postgresql.org; Tue, 28 May 2019 08:09:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hVXB1-0004Yi-C5 for pgsql-admin@arkaria.postgresql.org; Tue, 28 May 2019 08:09:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVXB1-0004Yb-3L for pgsql-admin@lists.postgresql.org; Tue, 28 May 2019 08:09:43 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVXAy-0008Fu-L7 for pgsql-admin@lists.postgresql.org; Tue, 28 May 2019 08:09:42 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id B782650589; Tue, 28 May 2019 10:09:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id PNtloN4Bo8eW; Tue, 28 May 2019 10:09:25 +0200 (CEST) Message-ID: <9cb8862470c05723f45ac841374a301c9149a9b0.camel@cybertec.at> Subject: Re: Logical Replication postgres 10.5 From: Laurenz Albe To: Mai Peng Cc: pgsql-admin@lists.postgresql.org Date: Tue, 28 May 2019 10:09:23 +0200 In-Reply-To: <91E83047-9936-43F5-A309-F499920681D7@webedia-group.com> References: <91E83047-9936-43F5-A309-F499920681D7@webedia-group.com> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Please always include the mailing list in your replies. Mai Peng wrote: > Le 28 mai 2019 à 07:59, Laurenz Albe a écrit: > > > On Tue, 2019-05-28 at 07:21 +0200, Mai Peng wrote: > > > Is Logical Replication ignore foreign key constraint ? How does it possible ? > > > > Can you specify what you mean by "ignoring foreign key constraints"? > > Like, some SQL that demonstrates what you are talking about. > > The table that stores primary keys is empty, and the table with foreign keys still replicates. That is because "session_replication_role" is set to "replica" when changes are replicated. This prevents foreign key constraints from being checked. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com