It is a usual piece of advice to redirect select queries to a secondary replica by declaring the connections as read-only. But I have a doubt regarding this.
I know two facts:
Transactions created in the primary replica must be commited first in the synchronous secondary replica.
Select queries acquire shared locks on the tables, which prevent other queries from performing modifications.
Does this means that selects queries in read-only connections, which can be sent to the secondary replica in order to improve performance, actually could affect overall performance as they were executed in the primary replica?
Note that this only would occur with synchronous replicas, not with asynchronous ones.
Thanks in advance,
Ignacio