pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Issa Gorissen <issa-gorissen@usa.net>
Cc: Torsten Förtsch <tfoertsch123@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: WAL Archiving and base backup
Date: Tue, 18 Jan 2022 12:53:03 -0500
Message-ID: <20220118175303.GD10577@tamriel.snowman.net> (raw)
In-Reply-To: <CAKFQuwYL65Sge1sX8gASvC0FPz-nvqFE25ngOvdiBvXfV+cxMQ@mail.gmail.com>
References: <164bc278-a4cd-f7cf-613b-e1c94aa63e56@usa.net>
	<CAKkG4_=gQ8dH9xvKpa9D1aV__-suEdt5HyW6fYW+dpVTHi9n8A@mail.gmail.com>
	<1d73a885-1c78-eec5-fbc6-fe5e0f621e5f@usa.net>
	<20220114183144.GA10577@tamriel.snowman.net>
	<CAKFQuwYL65Sge1sX8gASvC0FPz-nvqFE25ngOvdiBvXfV+cxMQ@mail.gmail.com>

Greetings,

* David G. Johnston (david.g.johnston@gmail.com) wrote:
> On Fri, Jan 14, 2022 at 11:31 AM Stephen Frost <sfrost@snowman.net> wrote:
> > * Issa Gorissen (issa-gorissen@usa.net) wrote:
> > > Thx a lot. I thought about it but was not so sure about having a complex
> > > script (compared to the very simple version when using the exclusive
> > backup
> > > - but this this is deprecated...).
> > >
> > > I will test your option with the simpler version and post it back to it
> > can
> > > maybe land in PostgreSQL documentation.
> >
> > The PG docs show how the command works and that's it.  The commands
> > in the docs aren't intended to be actually used in production
> > environments.  Writing a full solution involves having a good
> > understanding of the PG code and how WAL archiving, backups, et al, are
> > done.
> 
> For all my suggestions of "use third-party where possible" I do think that
> we should have, probably as part of pg_basebackup, a mode that performs a
> filesystem copy of WAL to an archive location and verifies that the archive
> is valid otherwise it write to the PostgreSQL log that there was a
> problem.  pg_basebackup should either be able to install that command (with
> maybe some CLI prompts for settings or something) using ALTER SYSTEM.  Our
> documentation can then demonstrate the example usage of the archive_command
> parameters as being a generic form of that command.

We already have pg_receivewal, which is part of pg_basebackup, and is
able to use a slot and such.  I'm not sure that making pg_basebackup
somehow also work as an archive command makes much sense- it's really
intended to be a tool that's used remotely and that isn't going to work
when being called out of archive_command.

That is, if I'm on system B and doing pg_basebackup against system A,
all of which happens using the PG replication protocol, how would
pg_basebackup called out of archive_command be able to get the WAL over
to system B..?

Thanks,

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (21+ messages)  latest in thread

Message-ID: <20220118175303.GD10577@tamriel.snowman.net>
Permalink:  ../20220118175303.GD10577@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20220118175303.GD10577@tamriel.snowman.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, david.g.johnston@gmail.com, issa-gorissen@usa.net, tfoertsch123@gmail.com
  Subject: Re: WAL Archiving and base backup
  In-Reply-To: <20220118175303.GD10577@tamriel.snowman.net>
  References: <164bc278-a4cd-f7cf-613b-e1c94aa63e56@usa.net> <CAKkG4_=gQ8dH9xvKpa9D1aV__-suEdt5HyW6fYW+dpVTHi9n8A@mail.gmail.com> <1d73a885-1c78-eec5-fbc6-fe5e0f621e5f@usa.net> <20220114183144.GA10577@tamriel.snowman.net> <CAKFQuwYL65Sge1sX8gASvC0FPz-nvqFE25ngOvdiBvXfV+cxMQ@mail.gmail.com> <20220118175303.GD10577@tamriel.snowman.net>

* 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