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 1jX9p4-00036S-Sv for pgsql-general@arkaria.postgresql.org; Fri, 08 May 2020 20:42:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jX9p3-0003qd-Po for pgsql-general@arkaria.postgresql.org; Fri, 08 May 2020 20:42:17 +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 1jX9p3-0003qU-II for pgsql-general@lists.postgresql.org; Fri, 08 May 2020 20:42:17 +0000 Received: from ns76.e-blokos.com ([51.79.78.76] helo=node76.e-blokos.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jX9p0-0002gl-7Y for pgsql-general@lists.postgresql.org; Fri, 08 May 2020 20:42:17 +0000 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by node76.e-blokos.com (8.15.2/8.15.2) with ESMTP id 048Kg8E6017292 for ; Fri, 8 May 2020 20:42:10 GMT Subject: Re: pg_basebackup cannot compress to STDOUNT To: pgsql-general@lists.postgresql.org References: <22a6f05d-1bf3-1ea1-d32b-c44b08ed5767@aklaver.com> <70a49d18-c6cb-69e3-1ea8-ef09ebb5b579@e-blokos.com> From: Support Message-ID: Date: Fri, 8 May 2020 13:42:04 -0700 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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!