public inbox for [email protected]  
help / color / mirror / Atom feed
From: tushar <[email protected]>
To: Robert Haas <[email protected]>
Cc: Dipesh Pandit <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Jeevan Ladhe <[email protected]>
Cc: Dmitry Dolgov <[email protected]>
Cc: Mark Dilger <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: refactoring basebackup.c
Date: Fri, 28 Jan 2022 16:15:41 +0530
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmoZfP=rsZB_9vDGfhuNgSu_M_09UWu8SjvsP65y_1pQFCg@mail.gmail.com>
References: <CAOgcT0OarU7csuf6Obgmg96DdjpGKUSETx5d6ss3eJx7VD+bdA@mail.gmail.com>
	<[email protected]>
	<CAOgcT0NH+DRkj6pr51DsYyPg73Fuj-uLpr707akfZcbaxTqdvQ@mail.gmail.com>
	<CAC6VRoYRJkzRxU_TVG7PMGMn5+Eb-VSOiO+mVaj2WUyeF9DpkA@mail.gmail.com>
	<CAOgcT0NBurXSm+ZeF=PiBcAm9mywHFo6Jc9G+F7JFU8O9sndBQ@mail.gmail.com>
	<CA+TgmoZ5_j+ZLf66_EioReGXvYTCkgQZju9SDq8yg_QbY_1vTw@mail.gmail.com>
	<CAN1g5_FSqShfWKibkCrJr45hHtRCBQUUtGVEHn4wNv=YCkybtQ@mail.gmail.com>
	<CA+TgmobQYkP81QQgS6tvvt4cRxvmipHQ4eU-aNjSpiZJhdkckA@mail.gmail.com>
	<CA+Tgmoa-ST7fMLsVJduOB7Eub=2WjfpHS+QxHVEpUoinf4bOSg@mail.gmail.com>
	<[email protected]>
	<CA+TgmoaMwgdx8HxBjF8hmbohVvPL_0H5LqNrSq0uU+7BKp_Q2A@mail.gmail.com>
	<[email protected]>
	<CA+TgmoaEg1oNHayVF33yVvRPvEyVofDS_iN6+iimZbPtVkki7w@mail.gmail.com>
	<[email protected]>
	<CA+TgmoZfP=rsZB_9vDGfhuNgSu_M_09UWu8SjvsP65y_1pQFCg@mail.gmail.com>

On 1/27/22 11:12 PM, Robert Haas wrote:
> Well what's weird here is that you are using both --gzip and also
> --compress. Those both control the same behavior, so it's a surprising
> idea to specify both. But I guess if someone does, we should make the
> second one fully override the first one. Here's a patch to try to do
> that.
right, the current behavior was  -

[edb@centos7tushar bin]$ ./pg_basebackup  -t server:/tmp/y101 --gzip -Z 
none  -Xnone
pg_basebackup: error: cannot use compression level with method none
Try "pg_basebackup --help" for more information.

and even this was not matching with PG v14 behavior too
e.g
  ./pg_basebackup -Ft -z -Z none  -D /tmp/test1  ( working in PG v14 but 
throwing above error on PG HEAD)

and somewhere we were breaking the backward compatibility.

now with your patch -this seems working fine

[edb@centos7tushar bin]$ ./pg_basebackup  -t server:/tmp/y101 --gzip*-Z 
none*  -Xnone
NOTICE:  WAL archiving is not enabled; you must ensure that all required 
WAL segments are copied through other means to complete the backup
[edb@centos7tushar bin]$ ls /tmp/y101
backup_manifest *base.tar*

OR

[edb@centos7tushar bin]$  ./pg_basebackup  -t server:/tmp/y0p -Z none  
-Xfetch *-z*
[edb@centos7tushar bin]$ ls /tmp/y0p
backup_manifest *base.tar.gz*

but what about server-gzip:0? should it allow compressing the directory?

[edb@centos7tushar bin]$  ./pg_basebackup  -t server:/tmp/1 
--compress=server-gzip:0  -Xfetch
[edb@centos7tushar bin]$ ls /tmp/1
backup_manifest  base.tar.gz

-- 
regards,tushar
EnterpriseDB  https://www.enterprisedb.com/
The Enterprise PostgreSQL Company



view thread (10+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: refactoring basebackup.c
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox