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:
- can I add the index without breaking logical replication?
- what will happen if the sender will eventually add the index in the future?
-
1: yes, 2: nothinguser1822– user18222022年07月21日 10:42:09 +00:00Commented 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 givensvalo– svalo2022年07月21日 12:00:57 +00:00Commented Jul 21, 2022 at 12:00