0

PostgreSQL.

When using physical replication, does a given row in a table in the replica database have the same primary key value as its corresponding row in the primary database?

Same question when using logical replication.

Thank you.

asked Aug 1, 2024 at 23:04
1
  • This site works best with single questions. You can make it into a single question by saying "physical or logical". Otherwise there is a possibility that the question could be closed. Commented Aug 2, 2024 at 16:56

1 Answer 1

0

Both Physical replication as well as logical replication the downstream server i.e, standby in case of physical replication and subscriber in logical replication will have the exact values as in the source. In logical replication a table is expected to have primary key for UPDATE & DELETE operation but for physical replication a PK is not mandatory for such operations.

Additionally physical replication works on whole cluster while logical replication have selectivity which allows you to choose database/schema/tables.

answered Aug 2, 2024 at 2:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.