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?