pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Mai Peng <maily.peng@webedia-group.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Logical Replication postgres 10.5
Date: Tue, 28 May 2019 10:09:23 +0200
Message-ID: <9cb8862470c05723f45ac841374a301c9149a9b0.camel@cybertec.at> (raw)
In-Reply-To: <91E83047-9936-43F5-A309-F499920681D7@webedia-group.com>
References: <DBB6941F-757E-4C8A-AAFA-AF5651635EB2@webedia-group.com>
	<e37bf29fe3f8421921486d235b8a775fa40d118c.camel@cybertec.at>
	<91E83047-9936-43F5-A309-F499920681D7@webedia-group.com>

Please always include the mailing list in your replies.

Mai Peng wrote:
> Le 28 mai 2019 à 07:59, Laurenz Albe <laurenz.albe@cybertec.at> 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






view thread (4+ messages)

Message-ID: <9cb8862470c05723f45ac841374a301c9149a9b0.camel@cybertec.at>
Permalink:  ../9cb8862470c05723f45ac841374a301c9149a9b0.camel@cybertec.at/
Also on:    postgresql.org/message-id/9cb8862470c05723f45ac841374a301c9149a9b0.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, maily.peng@webedia-group.com
  Subject: Re: Logical Replication postgres 10.5
  In-Reply-To: <9cb8862470c05723f45ac841374a301c9149a9b0.camel@cybertec.at>
  References: <DBB6941F-757E-4C8A-AAFA-AF5651635EB2@webedia-group.com> <e37bf29fe3f8421921486d235b8a775fa40d118c.camel@cybertec.at> <91E83047-9936-43F5-A309-F499920681D7@webedia-group.com> <9cb8862470c05723f45ac841374a301c9149a9b0.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox