Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9sfM-0005bS-Ij for pgsql-general@arkaria.postgresql.org; Tue, 18 Jan 2022 17:53:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n9sfL-0004Cf-Gm for pgsql-general@arkaria.postgresql.org; Tue, 18 Jan 2022 17:53:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9sfL-0004CW-5h for pgsql-general@lists.postgresql.org; Tue, 18 Jan 2022 17:53:07 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n9sfI-0004NS-NG for pgsql-general@lists.postgresql.org; Tue, 18 Jan 2022 17:53:06 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id C56095F79F; Tue, 18 Jan 2022 12:53:03 -0500 (EST) Date: Tue, 18 Jan 2022 12:53:03 -0500 From: Stephen Frost To: "David G. Johnston" Cc: Issa Gorissen , Torsten =?iso-8859-1?Q?F=F6rtsch?= , pgsql-general Subject: Re: WAL Archiving and base backup Message-ID: <20220118175303.GD10577@tamriel.snowman.net> References: <164bc278-a4cd-f7cf-613b-e1c94aa63e56@usa.net> <1d73a885-1c78-eec5-fbc6-fe5e0f621e5f@usa.net> <20220114183144.GA10577@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zS7rBR6csb6tI2e1" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --zS7rBR6csb6tI2e1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * David G. Johnston (david.g.johnston@gmail.com) wrote: > On Fri, Jan 14, 2022 at 11:31 AM Stephen Frost wrote: > > * Issa Gorissen (issa-gorissen@usa.net) wrote: > > > Thx a lot. I thought about it but was not so sure about having a comp= lex > > > 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. >=20 > 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 archi= ve > is valid otherwise it write to the PostgreSQL log that there was a > problem. pg_basebackup should either be able to install that command (wi= th > maybe some CLI prompts for settings or something) using ALTER SYSTEM. Our > documentation can then demonstrate the example usage of the archive_comma= nd > 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 --zS7rBR6csb6tI2e1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJh5v5/AAoJEO1sijiDR2RV16gP/1KYxtUPZhiI5ir/HX1SRrrp Oj8bG1vDBe/U8Evr0er8PySN/IK7EAgavy3KwJirVs6UIYiBMJiFNWEFuVbqZK3Y Tp6TiuUdZw/YnQ35A3zQKmxNu9v9NBFSw+Jj2dehvQP2zhhCkfncC4aoo9Bl6NLc 9DCQXI3alVmyu8VEg9mBSj8LkNoHZefkWARdts4go0ssqUUstxZpOURu0niTkYNX 55hHoaKgtMl/s1oNeFzIYh/4ZD/OTFLzziQBL6oORpsw/zAlj17cEW7kFoElRTSD Aw50SAab6hT8ISqfqLNCuSIo7JqCW8UmU1brj0Cx8oyA7mK7Tj2Ur2wL1Z+Psbjb l36x4sAgM8aGnQOAjYr4CLSs+5cTBovPtLe9XZIyGLU30/aF0NMOwbOgPQTG31T/ 4lJ6J0RIUvdrI8tHregCKLAHm7aUEhDUe2YiZSgp30yPbNKFIUYu1Qr1FQQVCV17 0QRlkrKXZGlNXTKMOud+K0DC8xRmenWS0qi7AdT6U4Bt6b+cgsT303ukKpzOd6ld bS/WN0GN8myGCuYCJDHwAQLDCABgyW3p2Y3c4BoqZrXYA1thcCR8gqJG6gUtb7MN 3PgCleOxXvz5svLdoNrSJ8rR19yMSCuk9N+vMlkRtoxy7/AStmkCp86PRO4N/p+3 i7PEFwaqFUJft0mmj/xF =Oze5 -----END PGP SIGNATURE----- --zS7rBR6csb6tI2e1--