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 1m5SS8-0002Bn-SG for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Jul 2021 12:32:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m5SS7-0007jz-IY for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Jul 2021 12:32:55 +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 1m5SS6-0007jo-UA for pgsql-hackers@lists.postgresql.org; Mon, 19 Jul 2021 12:32:55 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m5SS3-0007gD-Ah for pgsql-hackers@postgresql.org; Mon, 19 Jul 2021 12:32:54 +0000 Received: by mail-pg1-x530.google.com with SMTP id 62so18844603pgf.1 for ; Mon, 19 Jul 2021 05:32:50 -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=0PA29Vz7lOI3jiyPDRqaIumgl+mWI1Yh3GiGI8d3Heg=; b=ASwSjmgvgQXpY+aukL+8mE7oE0QPs01OmmC/biF+GVf9uOgSeBTplHHgm4EfXw5WsH fhu/iC1Mrh2/c3bvugheSk2mP7ae5YXceV3+0sXUJKHodqJi9f5IHZO7IM7zY8buun0D qkE0iQscJUnwp128bgnZAMqTSx6U+jOb61GvZaa075aVh1OBzom3hKGoylBqOU/x9Qu/ yf9sdRwnH4s7br17tI+2eEO70UdnK3Q3okd3/nMMIPDgiD4lqGI6vzrawLy1u6wOt2S9 hzma6DaVlM1eHemS3UCAzd1D7pRHVg5UwInWc75JB4Au3pB1NnxR5wrObBw1Q2UNh5YB oNiw== 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=0PA29Vz7lOI3jiyPDRqaIumgl+mWI1Yh3GiGI8d3Heg=; b=VK7eUqjStR2JTjVfZGiYnxKv4Ih7/sMIiQtfxT2AxM+HMLsV9iILBcekm6TPfDxExx eiRqHplmticUwPoMkqMPrZp1jhXR4OooOcHmnYpiIbz4+oJTgEEgKss7i+G9VEXQn8Bg kJFG71PqKv7h+LkvCGsauLSc9KMAJyulr2wjIdSHW6kD9U6LoFOPUpbm38PE2RhcU0ln ByI0mhcftxBv1Vb8AoT5gAJ3xZvpTyN0fiKC2QFsFTNQWoTFXVkIvvMRk/RJzId/Djyt ryUmhiaDjc49OI+Mqw2/JNiuEoZxW2IPIQZ1B90/EQNpVNid6N+f9WOoaqHkxaBBqip2 E80Q== X-Gm-Message-State: AOAM531p685UP30Nwrpr3WAyoH0Hf+JDH63OQ8XEGBSzMWboKRvCh8I+ mhJDDVWw6gIozx3S5hvXUumQ6TlPswQhMcrCcEv+FBZFFXlP/vhE0+huT4KWZxzHLI2ipj1t3Lk qZa9jJDDG+wbQY1yODLYA5TcqW+8D7/REAJMdTGi2haBSgHjKXIAKy0YgPb/EEN6+spw4oNSbjx 979VTas2erczEPZflP7u6zxRZaaN6JZ/lveUwovUQRbv54hAv8WBgIWzXuxalXp4D2q+ZdNaFlv x1ZBS6y75Agn9Fj+tQxC/WYv99+aaaHkgSovw== X-Google-Smtp-Source: ABdhPJzO2GqNGcEadPUWrK+Ar6Db0Ma6zot8TQMJNIKoRVW1p56M8HneDF/NnoNHrjyw2a5d0o7NsA== X-Received: by 2002:a63:6cc:: with SMTP id 195mr25130672pgg.281.1626697968020; Mon, 19 Jul 2021 05:32:48 -0700 (PDT) Received: from localhost.localdomain ([45.113.251.168]) by smtp.gmail.com with ESMTPSA id z8sm20423488pfc.155.2021.07.19.05.32.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 05:32:47 -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> From: tushar Message-ID: <1cee30a1-b7db-41fa-7ec7-4e2750e5132d@enterprisedb.com> Date: Mon, 19 Jul 2021 18:02:43 +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/16/21 12:43 PM, Dilip Kumar wrote: > I think the problem is that bbsink_gzip_end_archive() is not > forwarding the end request to the next bbsink. The attached patch so > fix it. Thanks Dilip. Reported issue seems to be fixed now with your patch [edb@centos7tushar bin]$ ./pg_basebackup --server-compression=gzip4  -t server:/tmp/data_2 -v  -Xnone -R pg_basebackup: initiating base backup, waiting for checkpoint to complete pg_basebackup: checkpoint completed NOTICE:  all required WAL segments have been archived pg_basebackup: base backup completed [edb@centos7tushar bin]$ OR [edb@centos7tushar bin]$ ./pg_basebackup   -t server:/tmp/pv1 -Xnone   --server-compression=gzip4 -r 1024  -P NOTICE:  all required WAL segments have been archived 23133/23133 kB (100%), 1/1 tablespace [edb@centos7tushar bin]$ Please refer this scenario ,where -R option is working with '-t server' but not with -Ft --not working [edb@centos7tushar bin]$ ./pg_basebackup --server-compression=gzip4  -Ft  -D ccv   -Xnone  -R --no-manifest pg_basebackup: error: unable to parse archive: base.tar.gz pg_basebackup: only tar archives can be parsed pg_basebackup: the -R option requires pg_basebackup to parse the archive pg_basebackup: removing data directory "ccv" --working [edb@centos7tushar bin]$ ./pg_basebackup --server-compression=gzip4 -t   server:/tmp/ccv    -Xnone  -R --no-manifest NOTICE:  all required WAL segments have been archived [edb@centos7tushar bin]$ -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company