Re: Logical Replication - Different Primary Key on Source Table and Destination Table - Mailing list pgsql-general

From David G. Johnston
Subject Re: Logical Replication - Different Primary Key on Source Table and Destination Table
Date
Msg-id CAKFQuwYKqk9W_M1L8HsJuV7J4_OYLXcU2WMFxjovTVkE50_NXA@mail.gmail.com
Whole thread Raw
In response to Logical Replication - Different Primary Key on Source Table and Destination Table  (Avi Weinberg <AviW@gilat.com>)
List pgsql-general
On Thu, Aug 5, 2021 at 12:22 AM Avi Weinberg <AviW@gilat.com> wrote:

Is it permitted to have different primary key on source and destination tables?


Sure, but you are still going to want a unique index on the source table that includes the site ID to act as a replica identity.  Which of the two unique indexes is "primary" is largely immaterial.

David J.

pgsql-general by date:

Previous
From: Laura Smith
Date:
Subject: PostgreSQL Apt Repository instructions need updating
Next
From: Vijaykumar Jain
Date:
Subject: Re: autovacuum worker started without a worker entry