Re: pg_basebackup cannot compress to STDOUNT

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Support <admin(at)e-blokos(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_basebackup cannot compress to STDOUNT
Date: 2020-05-08 21:28:42
Message-ID: 47e2ac23-b8b0-8c02-1ac8-c8f251ef8fde@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Fehrle, Brian 2020-05-08 21:52:26 Re: Thoughts on how to avoid a massive integer update.
Previous Message Michael Lewis 2020-05-08 21:11:04 Re: AutoVacuum and growing transaction XID's