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 1n4Qsd-00061p-75 for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jan 2022 17:12:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n4Qsb-000181-PD for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jan 2022 17:12: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 1n4Qsb-00017s-42 for pgsql-hackers@lists.postgresql.org; Mon, 03 Jan 2022 17:12:17 +0000 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n4QsY-0004ou-4L for pgsql-hackers@postgresql.org; Mon, 03 Jan 2022 17:12:16 +0000 Received: by mail-qt1-x834.google.com with SMTP id v22so30989100qtx.8 for ; Mon, 03 Jan 2022 09:12:13 -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=3b/r7n3lcRJnB8K6MpQLD26v/xDv9Aw9eDWt22QzmeQ=; b=ZtaNA26ED5WqPqn9pvcxFDFFOLN5Wkkjqr8Oq3r3MDjoQg4WoseuDktN1ld59b2PPI wjawglQuAVm678wwMYkIDdPRIBTiQOoI/sFtLxt+PLLM+Xc5hC1l8Deg7GzhYymCkEFz q8IlV1hpaz9AGDgLHrY33ULlAiGnBF6QQitMoN+BQJf+fGj0ZmUwUeMLqbcE5k4uM7JU nJQ93A5KdERHzPU7zrxuUfxjrYUc2YI1K9ryjHcfdEmp9bc7fZXpa903R9noakmGTXUz FmGynvInP33CTNFog4XsMhr/+yHerF6rAflN03pGFrS0LB0z8gAXy3QF40KMO/D8ur9a 17dw== 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=3b/r7n3lcRJnB8K6MpQLD26v/xDv9Aw9eDWt22QzmeQ=; b=Go++ZUprJE5lmdic7+r0zs37DBjbcsFVJsRBa7uJKwIbV1kvf3+3mETC3LzO2+POiJ LpXLrQeUQRhDskVhIaVEgWF5sf+QFBrou5toNrKF2BKOoxEcFroyQO9yOfKYbnIvs3n2 EJDqY8/6CetqnMrBj3j+ySHE5oY/Y03DH8NpYVUg683pXCM1rIVKVq6Yh3E6qiuV90gY hs7yMsrPIUJaIt+7vFUVYSYv2RB5DbYO3f8IVpBXoerwyBkGFyuHuDt/vzAjc4zLYweb 3/IBsiKFcYLnDNHXOW4K6dFHCTq639aoQ0wHrSoqyTS/uTh/RRLHaKYv3Z8IW4XVDWst TITQ== X-Gm-Message-State: AOAM531yAATMPhAbiweJufPrU6IbRyBVc7PtRmqZMdFtVnSF3timLNR5 0uqSMzyxZGuL2Anwl2q4BkvMpPXNb0KFGjQ7TvQZqMa/k7+9O5UhEC6NVngfC7SGMJ7Z2gJXqA+ IzJ4LHHux0O23Rs8t5mNg9D4zookxw2LYlY9P/6cx8zP6mTXuQtZt0Qwqvp2uhIeKT1AlL4JBu/ XKGUKQ1ZDGMjJoX5gbNOv69ajvIQzsRGtY0fziyYZ+SgPfJKUFgKjMBeG4Q55iH0sThcHdGzznX GELmEx1onjJ9MmVhaSat1eWdssR3mFnFQxZzA== X-Google-Smtp-Source: ABdhPJwMEtCF8WJ4T+ytA/vTVjamvryxx+alGfIgb2bLq/F9CFHFyyk2Ie3Dc/O8OO9k7QJnJs2Rnw== X-Received: by 2002:a05:622a:8a:: with SMTP id o10mr40786263qtw.178.1641229931138; Mon, 03 Jan 2022 09:12:11 -0800 (PST) Received: from localhost.localdomain ([45.113.251.168]) by smtp.gmail.com with ESMTPSA id y124sm27468064qkd.105.2022.01.03.09.12.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Jan 2022 09:12:10 -0800 (PST) Subject: Re: refactoring basebackup.c To: Jeevan Ladhe , Robert Haas Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Mark Dilger , "pgsql-hackers@postgresql.org" References: <20211115162641.dmo6l32fklh64gnw@localhost> From: tushar Message-ID: <38e18142-9fd7-0d05-501c-451081060407@enterprisedb.com> Date: Mon, 3 Jan 2022 22:42:03 +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 11/22/21 11:05 PM, Jeevan Ladhe wrote: > Please find the lz4 compression patch here that basically has: Please refer to this  scenario , where --server-compression is only compressing base backup into lz4 format but not pg_wal directory [edb@centos7tushar bin]$ ./pg_basebackup -Ft --server-compression=lz4 -Xstream -D foo [edb@centos7tushar bin]$ ls foo backup_manifest  base.tar.lz4  pg_wal.tar this same is valid for gzip as well if server-compression is set to gzip edb@centos7tushar bin]$ ./pg_basebackup -Ft --server-compression=gzip4 -Xstream -D foo1 [edb@centos7tushar bin]$ ls foo1 backup_manifest  base.tar.gz  pg_wal.tar if this scenario is valid then both the folders format should be in lz4 format otherwise we should get an error something like - not a valid option ? -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company