Re: Archive clean up command in recovery.conf

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Prince Pathria <prince(dot)pathria(at)goevive(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Archive clean up command in recovery.conf
Date: 2018-09-24 06:22:04
Message-ID: 2779539bc6e5413b71064f92b44e2a7f6bdfcde0.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message CONVERS Yann - DREAL Auvergne-Rhône-Alpes/CIDDAE/SIG 2018-09-24 07:47:11 Tr: Re: WAL segments held for replcation
Previous Message Laurenz Albe 2018-09-24 06:19:53 Re: WAL segments held for replcation