Re: Archive directory

From: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Cc: Yambu <hyambu(at)gmail(dot)com>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Archive directory
Date: 2020-12-07 14:08:15
Message-ID: 5b4dcc9a-774c-8816-a8ac-b055bc340b60@sqlexec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmail(dot)com> 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.
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2020-12-07 14:11:38 Re: Archive directory
Previous Message Paul Förster 2020-12-07 14:02:32 Re: Archive directory