pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: MichaelDBA <MichaelDBA@sqlexec.com>
To: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: Yambu <hyambu@gmail.com>
Cc: Ian Lawrence Barwick <barwick@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Archive directory
Date: Mon, 7 Dec 2020 09:08:15 -0500
Message-ID: <5b4dcc9a-774c-8816-a8ac-b055bc340b60@sqlexec.com> (raw)
In-Reply-To: <5AAB0FED-45AA-45F6-AFB5-A65A36275492@elevated-dev.com>
References: <CALhHtcBhOqhHmRjgiLfCKVS0mV3PSBS_61ZkKT9NvjNYMQw5wQ@mail.gmail.com>
	<CAB8KJ=gLEma2G3yGy6dO1PRtG1-nrRzTFcg8g17a8bPLXs5ODw@mail.gmail.com>
	<CALhHtcBRydsziEtQV+7rj81rHhL4N4jwTqGbBWDnLRMnB0tLBw@mail.gmail.com>
	<5AAB0FED-45AA-45F6-AFB5-A65A36275492@elevated-dev.com>

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 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.
>
>
>






view thread (10+ messages)  latest in thread

Message-ID: <5b4dcc9a-774c-8816-a8ac-b055bc340b60@sqlexec.com>
Permalink:  ../5b4dcc9a-774c-8816-a8ac-b055bc340b60@sqlexec.com/
Also on:    postgresql.org/message-id/5b4dcc9a-774c-8816-a8ac-b055bc340b60@sqlexec.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: MichaelDBA@sqlexec.com, scott_ribe@elevated-dev.com, hyambu@gmail.com, barwick@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Archive directory
  In-Reply-To: <5b4dcc9a-774c-8816-a8ac-b055bc340b60@sqlexec.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox