Re: Archive directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hmmm, I disagree with that statement:

The point of the archive_command is to release WALs from the WAL directory that have already been applied to the actual data files during checkpoints, and send these archived WALs elsewhere, whether it be a replica, another location on the master, or to a backup server like Barman and pgbackrest.  The ultimate goal is to preserve point in time recovery.

So postgres doesn't care where you send the WALs, but that you just did something with it so it can remove them from its own internal directory, pg_wal/pg_xlog.  So you can even do this: archive_command = '/bin/true' which actually does nothing but lets PG know it can remove that WAL from its WALDIR.

Regards,
Michael Vitale




Scott Ribe wrote on 12/7/2020 8:53 AM:
On Dec 7, 2020, at 6:47 AM, Yambu <hyambu@xxxxxxxxx> wrote:

Does the command ,archive_cleanup_command, delete the files from the master server? i understand this config is done on the slave server
The point of the archive command is to copy to the replica. If you're archiving on master, then using some script to copy to replica, then postgres has no way to know when it is safe to delete WAL files.









[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux