Let's say that I configured streaming replication between Server A (master) and Server B (slave). If server A goes down and Server B is promoted, would I be able to use pg_rewind, where Server B is the source and Server A is the target, to bring Server A back up up to speed with Server B? According to the documentation regarding pg_rewind:
The result is equivalent to replacing the target data directory with the source one.
I assume that the rewind wouldn't "rewind" anything, but since:
When the target server is started for the first time after running pg_rewind, it will go into recovery mode and replay all WAL generated in the source server after the point of divergence.
wouldn't I just be able to place server A in recovery mode and recover all the WAL segments generated by Server B, even though they are on different timelines?
Thanks!