Master(on server A), Upstream(on B, receiving wal from A), Downstream(on C, receiving wal from B).A is streaming wal logs on a few physical_replication_slots. All the other servers are created from pg_basebackup of A.

Now, I've another server X, dedicated to WAL storage. Whatever be the primary at the moment, its wal logs will be dumped on X inside directory(say /root/wal_logs). There's a pg_receivewal(on server X) process receiving this wal from Master and saving it in the same directory.

Under failover scenarios, slaves are promoted to master, and others act like slaves. So, I wanted to know,

How the logs on server X will be affected if masters keep on switching ? Can a new master server create a wal conflicting with the old server's wal ?

What if I create a new standby( D ) from pg_basebackup of A, and try recovering it from these logs ? There was some Timeline kinda concept(which I couldn't grasp much) in postgres wals. Can it have effect on recovery of D ?

And is it possible, for a Master demoted to standby, recover from these logs ? Or will I need pg_rewind for this?