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 1jXAY9-0004Zz-Iq for pgsql-general@arkaria.postgresql.org; Fri, 08 May 2020 21:28:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jXAY8-0000Sv-Fw for pgsql-general@arkaria.postgresql.org; Fri, 08 May 2020 21:28:52 +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 1jXAY7-0000R0-Ba for pgsql-general@lists.postgresql.org; Fri, 08 May 2020 21:28:52 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jXAY2-00036R-IA for pgsql-general@lists.postgresql.org; Fri, 08 May 2020 21:28:50 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5636D5C00BB; Fri, 8 May 2020 17:28:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 08 May 2020 17:28:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=Z hXL6DG3Vq4l4rIm6wiGoRWmdIugHUd+z1+DNrt7Gkw=; b=MG4dZCjTsRPaNQo3O ua9sfsOQZ0DYc3QMSnPTpL6mHR7OyEUM+NkhwhZySx0KccHbVIvFiTEKSK0JHuHw 92ACl+3QXnQmImgCNPaj6Ls3H2ftjv0jCZ+fyFfOZi9zt5t+TBZtwl0mGbx1sscr bZwSVQd+Py6AZ+YUPzAccVWcBysfQGJ4Y2Bt5jM+IAhFGtcJboO3yLTVOpML2TNa ju0125rwbkw6YvxiPAYQ47NV0dUa5Kj2BGWWajr66RxcGPYq4Gb0WJyrIKAz5vdp rK/31m+qBcutiYqPYIuzUr3DFy0AysScqdeaMXGTxy6DxQXC137hyi3OpfyS40yS ZAE3A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=ZhXL6DG3Vq4l4rIm6wiGoRWmdIugHUd+z1+DNrt7G kw=; b=Ww64HCFa9gMy8Rzbl/Ttjhk7apATtAOAu2xgfjvyNfarue4lGba6v0dQ2 uqc4IAkrfWsRoOyvBEh66Q+4KI3hxzoTXppBtWg4ZaKlwiBUDykVHzbvrpPId3bV mOCCzBORG0Ln6/UoV/PoPpvbJgRIDvFWerAxvRiQI0N/yXYyJpOjB5RfE6X2nZNQ ubc3Vo71rZM7aajclESzwBOClz6khFhYLc8RNrfcxi/JoOQzeloNRKO8/XcZYvcx /d7jYcj9YQneiu63gGwh0SB7cX4FR05FjRxt0kp4ErDoQl23naCx3CH/kDLWaPy3 X778JddOhJo953kOMpXswBlraJC+w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrkeefgdelhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekre dttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeduudefjeetve ffhefgudehtdfhvdetkeeiueehfeevveduteekleeuheegudehhfenucffohhmrghinhep phhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejhedrudejvddrhedrvdefudenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id AFB6E328005A; Fri, 8 May 2020 17:28:43 -0400 (EDT) Subject: Re: pg_basebackup cannot compress to STDOUNT To: Support , pgsql-general@lists.postgresql.org References: <22a6f05d-1bf3-1ea1-d32b-c44b08ed5767@aklaver.com> <70a49d18-c6cb-69e3-1ea8-ef09ebb5b579@e-blokos.com> From: Adrian Klaver Message-ID: <47e2ac23-b8b0-8c02-1ac8-c8f251ef8fde@aklaver.com> Date: Fri, 8 May 2020 14:28:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/8/20 1:42 PM, Support wrote: > > > On 5/8/2020 1:24 PM, Adrian Klaver wrote: >> On 5/8/20 12:31 PM, Support wrote: >>> >>> On 5/8/2020 12:18 PM, Adrian Klaver wrote: >>>> On 5/8/20 12:14 PM, Support wrote: >>>>> Hi, >>>>> >>>>> Despite of the --help saying that it's possible to gzip to STDOUT >>>>> and pipe it for another process >>>>> pg_basebackup fails saying that it's not possible to gzip to STDOUT. >>>> >>>> 1) Postgres version? >>>> >>>> 2) Command run? >>>> >>>> 3) Error reported? >>>> >>>>> >>>>> Who to believe then? >>>>> >>>>> >>> 1) Postgres version? >>> 12.2 selt compiled with >>> ./configure --with-perl --enable-integer-datetimes --enable-depend >>> --with-pam --with-systemd --enable-nls --with-libxslt --with-libxml >>> --with-llvm --with-python --with-icu --with-gssapi --with-openssl >>> >>> 2) Command run? >>> ssh postgres@nodeXXX "pg_basebackup -h /run/postgresql -Ft -D- | pigz >>> -c -p2 " | pigz -cd -p2 | tar -xf- -C /usr/local/pgsql/data >>> >>> 3) Error reported? >>> pg_basebackup: error: cannot stream write-ahead logs in tar mode to >>> stdout >> >> https://www.postgresql.org/docs/12/app-pgbasebackup.html >> "t >> tar >> >>     Write the output as tar files in the target directory. The main >> data directory will be written to a file named base.tar, and all other >> tablespaces will be named after the tablespace OID. >> >>     If the value - (dash) is specified as target directory, the tar >> contents will be written to standard output, suitable for piping to >> for example gzip. This is only possible if the cluster has no >> additional tablespaces and WAL streaming is not used. >>                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ >> " >> >> So use -X fetch or X none >> >> >>> Try "pg_basebackup --help" or more information. >>> tar: This does not look like a tar archive >>> tar: Exiting with failure status due to previous errors >>> >>> Thanks! >>> >>> > > Good catch thank you! It was not much of a catch, the error message supplied the info: "pg_basebackup: error: cannot stream write-ahead logs in tar mode to stdout " > > -- Adrian Klaver adrian.klaver@aklaver.com