Обсуждение: WAL log management w/ multiple slaves
Hi all. I currently have one master and one slave, and the slave cleans up the unneeded WAL files via pg_archivecleanup.
I'm adding a third slave and I was wondering what the best practices are in terms of managing these WAL files when there's more than one dependent server, in a situation where you can't have a slave removing the files.
I thought I could just cron up a removal of logs older than X days, which seems pretty easy, but not sure.
Wells Oliver wrote: > Hi all. I currently have one master and one slave, and the slave cleans up the unneeded WAL files via > pg_archivecleanup. > > I'm adding a third slave and I was wondering what the best practices are in terms of managing these > WAL files when there's more than one dependent server, in a situation where you can't have a slave > removing the files. > > I thought I could just cron up a removal of logs older than X days, which seems pretty easy, but not > sure. cron would work fine. My scripts clean up old archived WAL as part of the backup job - that way I can be sure that no archives are deleted unless they have been backed up first. Yours, Laurenz Albe
On Wed, Dec 3, 2014 at 10:30 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
cron would work fine.Wells Oliver wrote:
> Hi all. I currently have one master and one slave, and the slave cleans up the unneeded WAL files via
> pg_archivecleanup.
>
> I'm adding a third slave and I was wondering what the best practices are in terms of managing these
> WAL files when there's more than one dependent server, in a situation where you can't have a slave
> removing the files.
>
> I thought I could just cron up a removal of logs older than X days, which seems pretty easy, but not
> sure.
My scripts clean up old archived WAL as part of the backup job - that way I can be sure
that no archives are deleted unless they have been backed up first.
Yours,
Laurenz Albe
Regards,
Vasilis Ventirozos
Vasilis Ventirozos
El mar, 02-12-2014 a las 10:30 -0800, Wells Oliver escribió: > Hi all. I currently have one master and one slave, and the slave > cleans up the unneeded WAL files via pg_archivecleanup. > > > I'm adding a third slave and I was wondering what the best practices > are in terms of managing these WAL files when there's more than one > dependent server, in a situation where you can't have a slave removing > the files. Maybe you should use new feature of postgresql 9.4, replication slot: "Replication slots provide an automated way to ensure that the master does not remove WAL segments until they have been received by all standbys, and that the master does not remove rows which could cause a recovery conflict even when the standby is disconnected." > > I thought I could just cron up a removal of logs older than X days, > which seems pretty easy, but not sure. > > > Thanks! > > > -- > Wells Oliver > wellsoliver@gmail.com