1

I have a PostgreSQL 12 database set up to follow a remote database (version 12) using logical replication.

I do not control the sender database.

I need to perform queries on the DB filtering records based on values contained in a column which is not indexed, queries takes a long time to execute and so I would like to add an index on that column.

According to this documentation excerpt

(Note, however, that there is no need for the schemas to be absolutely the same on both sides.)

as the schema is not replicated it's possible to have different schemas on the receiver.

My questions are:

  1. can I add the index without breaking logical replication?
  2. what will happen if the sender will eventually add the index in the future?
2
  • 1: yes, 2: nothing
    – user1822
    Commented Jul 21, 2022 at 10:42
  • Thank you, I accepted mustaccio's answer as this was a comment but I'd happily change it if a wider answer will be given
    – svalo
    Commented Jul 21, 2022 at 12:00

1 Answer 1

1

The answers are, per a_horse_with_no_name

  1. yes
  2. nothing

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.