So i have a question. For a project we have been using a synchronous replication. It was set to ‘remote apply’. Now we have two nodes and a transaction has been started but our secondary can’t be reached. We have expected that we would just wait endlessly till our secondary comes back but if our waiting process is interrupted by no matter what, the data changes will be applied locally. We could already find out, that this is a known issue and that the cancellation shouldn’t be forbidden. Still we are confused, as per definition of synchronous streaming replication and remote apply, we thought that a transaction counts as successful committed if it has been streamed and written simultaneously to the primary and secondary Wal and then applied to both datasets, but apparently this isn’t true or is it?
As we see it now, the primary wal is written first. If this is true, is this always the case or just if the secondary can’t be reached?
And apparently also the changes to the primary dataset happen before they are applied to the secondary.
So can we even say that the remote apply is possible? Or synchronous replication?
Sorry if this is a trivial question but for us it seems that the deeper we the dig the more confused we get.
Hopefully you have some insights for us or can lead us to a direction where we can find the answer.
Thanks in advance,