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 1nD8GA-0006ck-ON for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Jan 2022 17:08:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nD8G9-0001Ze-Ij for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Jan 2022 17:08:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nD8G8-0001ZV-Sx for pgsql-hackers@lists.postgresql.org; Thu, 27 Jan 2022 17:08:33 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nD8G3-0005jT-O7 for pgsql-hackers@postgresql.org; Thu, 27 Jan 2022 17:08:31 +0000 Received: by mail-wr1-x429.google.com with SMTP id l25so5928998wrb.13 for ; Thu, 27 Jan 2022 09:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=G/3SjpRF6upfy1xPf35XDs2dj0AsjJdPwwCR0LtYRdc=; b=SoVKbbV+zyLtOlAfmKAoeWvVZCItVILZdrrW08JBDIIThiM7mC6YAB/8XWpcdubeiC qCir7JwXgXPy3UitKLgokIjh6i6ENwYkmsg5I5bM14Ksx9XbritEF1xqZRV5fXjQnPGY g3rQWeF0StJLtKnhSo0s1TeDCZh0p16EaGuX7E3tDKAC0ydXMwuhZ94TAyQm6mzD20nM Hx6BT44Iu6SR5ytU4po/jxKPrfR6m+L6JxLC8uE8KEroxeO20CgHg8iS/B6fKicViOsJ C5xHG7BanMnywt+sqAVjSvvjW3ujukzGz0gpEaivtOEGGcJXBgWoVBGwoEuBS3IxDAoy F3oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=G/3SjpRF6upfy1xPf35XDs2dj0AsjJdPwwCR0LtYRdc=; b=T0xiWxuzWbyJKw+YLEQwI2mkRcKj33OtTlnGvbcQHUNJUhVWR7oH8Px13BtruYyEOL jUWUIuZzaWatDi0XxlaIY1jDxvtQ+be0a/5zHCUMWFyUz93206UKQy1/aPdhvgUVtE9G OMns8cOngdPeMvyCbSQVK7Jlbt9Skr5Ip6uRvcirhJwbCwf411F0wP0kBYQtbYV/J/vZ otnQ2yHHLJGI4ijFAAg1SsIh+QQJkCVBBzoQXVf+tOL79fH+pNs/fJKqkISIVzptHj8D TLUaWyP15BqRD8T88YSaMioxLQmdIIKPiCxEjAFwiURycvU7YejYjGSX+zCEE2rb0Tex hcMQ== X-Gm-Message-State: AOAM530MJNBC5w4Vtvyt/U+OZt09fDVGkX69/P8eKrnDuoAV+HQFRjpm 4FDjQJB2zAWTHG0elxZG0bQxl/EXXTudOyHxMUjtfvK7lF+QgQG8u33zvzig4fR+NZBDZZKS8JI T+XHS7brQWF1K1bj7+TD4CjGoTpB6tuObqiNNWOY77KkdTzt7PF9ezYK+EyIzsuqfBopT5RNCKu HdV4g+2Hdf7y3PVsCYKAiL9/v9mx7bXFRMJ9xhIOy43yuRZthcWktgYFETN6i0UezCPYCRoHNZz oH8W4PQ2BI3JJ6mYuhLYLftfiwvITN9qjfYdA== X-Google-Smtp-Source: ABdhPJxXf1Kihjyb938PWjX6sO2AybCeGgOY7pJKM9HdF+aSvpKgWgY2FGNOOj6pwnR8WHvjiXU2Ig== X-Received: by 2002:a05:6000:11cd:: with SMTP id i13mr3712554wrx.318.1643303304815; Thu, 27 Jan 2022 09:08:24 -0800 (PST) Received: from localhost.localdomain ([45.113.251.168]) by smtp.gmail.com with ESMTPSA id r12sm2519433wrw.73.2022.01.27.09.08.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jan 2022 09:08:24 -0800 (PST) Subject: Re: refactoring basebackup.c To: Robert Haas Cc: Dipesh Pandit , Michael Paquier , Jeevan Ladhe , Dmitry Dolgov <9erthalion6@gmail.com>, Mark Dilger , "pgsql-hackers@postgresql.org" References: <2ed9c215-5d25-04b8-1045-fa30a72085a4@enterprisedb.com> From: tushar Message-ID: <97b377c3-15b9-517f-1fca-8b4150978e91@enterprisedb.com> Date: Thu, 27 Jan 2022 22:38:15 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/27/22 10:17 PM, Robert Haas wrote: > Cool. I committed that patch. Thanks , Please refer to this scenario  where the label is set to  0 for server-gzip but the directory is still  compressed [edb@centos7tushar bin]$ ./pg_basebackup -t server:/tmp/11 --gzip --compress=0 -Xnone NOTICE:  all required WAL segments have been archived [edb@centos7tushar bin]$ ls /tmp/11 16384.tar  backup_manifest  base.tar [edb@centos7tushar bin]$ ./pg_basebackup -t server:/tmp/10 --gzip --compress=server-gzip:0 -Xnone NOTICE:  all required WAL segments have been archived [edb@centos7tushar bin]$ ls /tmp/10 16384.tar.gz  backup_manifest  base.tar.gz 0 is for no compression so the directory should not be compressed if we mention server-gzip:0 and both these above scenarios should match? -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company