public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pavel Tide <[email protected]>
To: Stephen Frost <[email protected]>
Cc: Yogesh Jadhav <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: [email protected]
Subject: Re: suppress empty archive_command warning message
Date: Tue, 27 Apr 2021 00:30:34 +0200
Message-ID: <CAAnkphVmKzU2K6C6id3oHyS+Z5EUJx5kHs0PC954UdFcrMYHaA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAAnkphW8RpmwodKyjQhT+6jaOSLG=ERd7n-9DHr0CLRSY2W+mg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<PS2PR03MB370260F10EA97D77B26FDE1AC4439@PS2PR03MB3702.apcprd03.prod.outlook.com>
	<CAAnkphU200qFbKLVOZnwccvOu8WSPUm5_32iuWTu-ZdPRQOkYw@mail.gmail.com>
	<[email protected]>
	<CAAnkphUSwjBYfiZO2w5+AwPftuY-vWQr8Br1eaWbfuCh=caX6A@mail.gmail.com>
	<[email protected]>
	<CAAnkphXozg84YJS8HfweC+qAHDefeRym7mvPcr9v1HbS-T2jkA@mail.gmail.com>
	<[email protected]>

> Uh, it's not that simple though.
>
> You absolutely *must* replay all of the WAL that existed at the time
> that the snapshot was taken and only after all of that WAL has been
> replayed can you stop WAL replay at some later point.  There's
> additional complexities if you have to deal with multiple storage
> devices and tablespaces since, typically, snapshots are not guaranteed
> across those and therefore you really need to actually do a
> pg_start_backup and a pg_stop_backup (and save the backup label file..).

We do trigger a pg_start_backup right before taking a snapshot
(simultaneous across all devices), and once the snapshot has been
taken we trigger pg_stop_backup.

> What does that mean "places itself as an archive command"?  You
> absolutely can not just start copying WAL files out of the pg_wal
> directory independently because PG recycles WAL files and the writes
> into them and you don't really "know" when a WAL file has been finished
> without taking other steps or arranging to have WAL files archived
> through calls to archive_command...

I mean that we use it as an archive_command.
Instead of placing some sort of "cp %p /mnt/nfs/%f" in
archive_command, we use '/bin/paveltide_utility %p'.

> None of this explains why you want to wait to ship WAL to the central
> server...

The server does not just accept the segments, but also uses its own
database to keep a note of the segments saved on the storage, LSNs,
and whatnot.
Continuous shipping means a higher load on the server, which we would
like to avoid.

Thanks!





view thread (15+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: suppress empty archive_command warning message
  In-Reply-To: <CAAnkphVmKzU2K6C6id3oHyS+Z5EUJx5kHs0PC954UdFcrMYHaA@mail.gmail.com>

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

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