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 1lFgNl-00067X-In for pgsql-docs@arkaria.postgresql.org; Fri, 26 Feb 2021 16:54:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lFgNj-0002Ow-NK for pgsql-docs@arkaria.postgresql.org; Fri, 26 Feb 2021 16:54:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFgNj-0002Op-Hg for pgsql-docs@lists.postgresql.org; Fri, 26 Feb 2021 16:54:23 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lFgNg-0007qz-Tl for pgsql-docs@lists.postgresql.org; Fri, 26 Feb 2021 16:54:23 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A61EB5F799; Fri, 26 Feb 2021 11:54:18 -0500 (EST) Date: Fri, 26 Feb 2021 11:54:18 -0500 From: Stephen Frost To: Philipp Gramzow Cc: Michael Paquier , pgsql-docs@lists.postgresql.org Subject: Re: incoorect restore_command Message-ID: <20210226165418.GY20766@tamriel.snowman.net> References: <161397938841.15451.13129264141285167267@wrigleys.postgresql.org> <478b5b00-5ab3-a1b5-65f4-19b4409c720b@philphonic.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="l4GQ7sizse6iPvDe" Content-Disposition: inline In-Reply-To: <478b5b00-5ab3-a1b5-65f4-19b4409c720b@philphonic.de> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --l4GQ7sizse6iPvDe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings, * Philipp Gramzow (phil@philphonic.de) wrote: > Am 24.02.2021 um 06:49 schrieb Michael Paquier: > >On Mon, Feb 22, 2021 at 07:36:28AM +0000, PG Doc comments form wrote: > >>I've been trying out saving and restoring compressed archive logs. The > >>restore_command stated in the docs at "25.3.6.2. Compressed Archive Logs" > >>('gunzip < /mnt/server/archivedir/%f > %p') did not work for me, because the > >>archive_command ('gzip < %p > /var/lib/pgsql/archive/%f') alters the > >>filename to %f.gz > >On which platform please? Using a pipe with gzip does not alter the > >output file name where the data is pushed to. > We're on RHEL 7. Thanks for pointing out my mistake, someone altered our > archive_command to use .gz extensions without me noticing it. Please excuse > the confusion. Note that the simple commands in the documentation are really just to give you an example of what an archive command would look like- they shouldn't be used verbatim since they don't provide any guarantees that the resulting compressed file has actually been written out to disk (something that an archive command really should provide the guarantee of- otherwise a crash will result in WAL files likely going missing and therefore you'll lose the ability to do PITR). Thanks, Stephen --l4GQ7sizse6iPvDe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJgOSe6AAoJEO1sijiDR2RVA0YP+wemmpSZl95xq6S0IGY7lYsl A7RT9T0XXIyCyRNKBmd/j4+rcB8eS8Wnf7FnkEU6Z9DLqDKHrlh2LmTekchUJyqr 12fKdwzI9nH0odlPjdPudjwYM9rcnFgd4EmEdRcAvI76KWfkprvtEDoCGYQeNITe l1N5t+zS/V2fmV5zB2+gV4nZvwWeFSRjXt7bKXhNOkpZRoMuIe2LNNs25T/CM6KI 47OHvZRd47PlTlptlRBx6TGlBqRj0lWOZzd9uxqcytEYTn/u0id6kNjLUrrll2Ey fscIjac/DPUX2Az1b++xHnS3lt1HaxK3n86G6Fpxkc0KT1f/GHTPn30HgqqBHRc/ o5p9FjOlAgtTVCXC44fN3192begf2tk2YS02a56P0j8BdiEN5NABuPgCF7M/XOj3 SVcX0hyofqQF8nPLNxnmS4Y/ZQbmWvNFQ9x9VEA0Vn7q/+zxzF3t2H79q8EhjRFE 8xBgduxj/DWdNgaBMSfNUvU0NwVHnjcsHB0eLsoSvaY1kBKnsDm1iG9kvMW0Z7yr i+3MIyni4esY2fMNNoC6LkD0lYWglxcqs5gEzYB46o/dImSJLIwzRoC7lVRRCPBq I5r0F9Zf9ubjWqlt1cO6b6JUACze3VoNHbuv7dwl1dO2J6gJjbmrgPMIMoNj7gcU /lx3RqJhvP3UI6jnmi3s =Xdxw -----END PGP SIGNATURE----- --l4GQ7sizse6iPvDe--