Prince Pathria wrote:
> I have a doubt, assume that I have 3 psql10 nodes (n1, n2, n3)
> and n1 is master ,n2+n3 are standbys. In n1 archive mode is on,
> and wal_logs are going to volume which is shared with n2 and n3.
> If archive_cleanup_command = 'pg_archivecleanup /path/to/nfs %r'
> is enabled on both n2 and n3.
>
> Can a situation might arise that a wal segment required by n2
> is already cleaned up by n3?
Yes, that pg_archivecleanup is a bad idea, because the faster
standby might remove files that the slower one still needs.
> If yes, then how to mitigate it?
Use streaming replication and replication slots.
Yours,
Laurenz Albe