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 1m6cHx-0006UF-NX for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jul 2021 17:15:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m6cHR-0004GF-31 for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jul 2021 17:14:41 +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 1m6cHQ-0004G6-E7 for pgsql-hackers@lists.postgresql.org; Thu, 22 Jul 2021 17:14:40 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m6cHN-0001HF-Gp for pgsql-hackers@postgresql.org; Thu, 22 Jul 2021 17:14:39 +0000 Received: by mail-pj1-x1034.google.com with SMTP id p5-20020a17090a8685b029015d1a9a6f1aso4066192pjn.1 for ; Thu, 22 Jul 2021 10:14:37 -0700 (PDT) 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=2RxBwNdfaaT0d3Jmdzxy6zMZkA1JycSh8TbIK+oTlqo=; b=edOiFTjy7P4aH7P/Zdr3r+5uAAJUyQA+ZS/sfIKlT4GqefO2B2yRzqGuQoeq29ebAU lVxKlHeJ7/RniUEZZZGxzv3fowfp7bUOZ+Hytzmwj6ygszoA5EjrgA5WmYmK5EuwnGtN RBZzMh5ms71bhmjxHk9Obyggt6cjwDGi6nW7pX631xKIGjMjqDAGhZ6wJMLaqpvqO/QA HON2KIH4o0gONIWoxAe3QrwzaxRsuaaJE7T4f8OME1AnfzELCEzAKOphr0cLf15riu0D Jo09BglcVGzRgdhrstjfziZLcsn/RxtMfm0psIMiB3GTK5mnHINr0qY4037UNYqa+tAe lQiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=2RxBwNdfaaT0d3Jmdzxy6zMZkA1JycSh8TbIK+oTlqo=; b=Hi5IhaTkDCQcj+AgwIrX0f5MpymxrsUKp4ZJ2G0qvfrB2WgKV6O5vTRDySAYJuL9wY A9VMcL4wP3aacO280RRzcp3hmnzCFXCPnntOqASrcJbkSicbmk2L3CBDhwe0kQD+upUp +X+2TDwm7t63SOgMatJqUS4iXclYB9pO5jI+dtDPO95ALqU96A1y2cNKxjAu9zEl9+OV BtC5PZhMBi940a3ieFMgu/2JEu6WtYfoTNUzpMUUr+/ykE2l/qbigYKckuYSXH3TZFA2 O5wENLNFJFFPG2EVw+FGZVkyu5KgoBfsAJtqNfWOVlXKKOEtTC/621aqfHbCebpVsevY W+iA== X-Gm-Message-State: AOAM531T7hotEqE9tmqn2dwkSOVRLR6nP6jwQ0j1Wn5Zr3JqZXSW5nrU WQOYxywkirUhQ/wT+04XdGSqQD8PP9rVg8QxfTEf12WIB5snAlRCvK9fLqfyTjR+Tt8I0gJvM/l zMBbrRsuWM4uRvjejFdxfOODWTAUAr4FB1/wXO8wOCEUI7JdQehI07Kq1f4WYnrtIlNfKCMDcCy EbR4jT7pMzz60dQAu4TEW0eUECbbnGyYnbd9ERBa7aZzpJ29TToQE80ado3DPDZggtC5kU7gAm0 m7+r8iWLLY7YNMTJPN3PTpRCL5dalrrOIeifQ== X-Google-Smtp-Source: ABdhPJwfEjObW840dI4M89g/7btDtwSQ26lgrqO8dQH5AywSk1wiME9dm/xtJVLmUFBOYmduob5KgA== X-Received: by 2002:a17:902:74c7:b029:12a:f5c7:49f7 with SMTP id f7-20020a17090274c7b029012af5c749f7mr820274plt.82.1626974075732; Thu, 22 Jul 2021 10:14:35 -0700 (PDT) Received: from localhost.localdomain ([45.113.251.168]) by smtp.gmail.com with ESMTPSA id h14sm7116846pfo.47.2021.07.22.10.14.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Jul 2021 10:14:35 -0700 (PDT) Subject: Re: refactoring basebackup.c To: Dilip Kumar Cc: Robert Haas , Mark Dilger , "pgsql-hackers@postgresql.org" References: <58D2BD01-B541-4032-9C0B-B6143841E7ED@enterprisedb.com> <4799332e-61ae-3a08-c5da-38f61fa0493d@enterprisedb.com> <1cee30a1-b7db-41fa-7ec7-4e2750e5132d@enterprisedb.com> From: tushar Message-ID: <0caaf88d-18c0-943a-d7ab-ac0fd5b05dc3@enterprisedb.com> Date: Thu, 22 Jul 2021 22:44:31 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.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 7/19/21 8:29 PM, Dilip Kumar wrote: > I am not sure why this is working, from the code I could not find if > the backup target is server then are we doing anything with the -R > option or we are just silently ignoring it OK, in an  another scenario  I can see , "-t server" working with "--server-compression" option  but not with -z  or -Z ? "-t  server" with option "-z"  / or (-Z ) [tushar@localhost bin]$ ./pg_basebackup -t server:/tmp/dataN -Xnone  -z  --no-manifest -p 9033 pg_basebackup: error: only tar mode backups can be compressed Try "pg_basebackup --help" for more information. tushar@localhost bin]$ ./pg_basebackup -t server:/tmp/dataNa -Z 1    -Xnone  --server-compression=gzip4  --no-manifest -p 9033 pg_basebackup: error: only tar mode backups can be compressed Try "pg_basebackup --help" for more information. "-t server" with "server-compression"  (working) [tushar@localhost bin]$ ./pg_basebackup -t server:/tmp/dataN -Xnone  --server-compression=gzip4  --no-manifest -p 9033 NOTICE:  WAL archiving is not enabled; you must ensure that all required WAL segments are copied through other means to complete the backup [tushar@localhost bin]$ -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company