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 1iKqCb-0007Sr-8z for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2019 20:47:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKqCZ-0003Fy-PO for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2019 20:47:23 +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 1iKqCZ-0003Fo-FL for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2019 20:47:23 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKqCW-000547-EL for pgsql-general@postgresql.org; Wed, 16 Oct 2019 20:47:22 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 2661217F92A0C for ; Wed, 16 Oct 2019 13:47:18 -0700 (MST) Date: Wed, 16 Oct 2019 13:47:18 -0700 (MST) From: PegoraroF10 To: pgsql-general@postgresql.org Message-ID: <1571258838155-0.post@n3.nabble.com> Subject: Changing PK on replicated database 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 I have replication using Publication/Subscription and configured with REPLI= CA IDENTITY DEFAULT, so it uses PK values to do the replication. Then, I=C2=B4= ve imported data in a new schema and that has several tables with a record wit= h its PK =3D 0. Replication works but my application doesn=C2=B4t because it = needs to see pk values > 0.=20 So, I have to change those records with 0 on their pk to any value, what is the best way to do that ? If i just change pk valued on master how will the data of that record be replicated ? That record will be sent to replica as update but that PK doesn=C2=B4t exis= t on replica server, so ... Or do I need to update them manually on Master and Replicated servers ? I didn=C2=B4t find any info about this on Docs and because that I=C2=B4m po= sting about this. -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.h= tml