Re: Archive directory - Mailing list pgsql-admin

From MichaelDBA
Subject Re: Archive directory
Date
Msg-id 5b4dcc9a-774c-8816-a8ac-b055bc340b60@sqlexec.com
Whole thread Raw
In response to Re: Archive directory  (Scott Ribe <scott_ribe@elevated-dev.com>)
List pgsql-admin
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@gmail.com> wrote:
>>
>> Does the command ,archive_cleanup_command, delete the files from the master server? i understand this config is done
onthe 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
copyto replica, then postgres has no way to know when it is safe to delete WAL files.
 
>
>
>




pgsql-admin by date:

Previous
From: Paul Förster
Date:
Subject: Re: Archive directory
Next
From: Scott Ribe
Date:
Subject: Re: Archive directory