Hello,
Our customer reported that pg_rewind took many hours to synchronize 400GB of data, even if the new primary doesn't
performany updates. The attached patch fixes that.
The cause was that pg_rewind failed to recognize data files in tablespace directories, resulting in the full copy of
thosefiles instead of WAL replay.
Regards
Takayuki Tsunakawa