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 1m5R4g-0007Y3-7O for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Jul 2021 11:04:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m5R4e-00013a-Sv for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Jul 2021 11:04:36 +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 1m5R4e-00013S-9M for pgsql-hackers@lists.postgresql.org; Mon, 19 Jul 2021 11:04:36 +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 1m5R4a-0000v5-J8 for pgsql-hackers@postgresql.org; Mon, 19 Jul 2021 11:04:34 +0000 Received: by mail-pj1-x1034.google.com with SMTP id cu14so11243157pjb.0 for ; Mon, 19 Jul 2021 04:04:32 -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-language; bh=bv2N0cGlA45wV6kzzv1FBVNeF0NKvqFbAQcDTDqZRp8=; b=bRIMqrEl4PSJ4+oaTx90HKveAvHeRQutEgBq7mdYOKNXF++zfnEWR4lZ2SJntI5eE1 qbnnGcfkeWOCJ8AWCfHY3g5/WzkU437afREpPCwVYhrfzA/ga2pRH7bRvy5X3vwAPtxk DuNRtP7gC/kG8Lr3O45wMbBEpOuFNjU2Lb6oZSq82uiqBu31Gc69e7Uw+QNsYFRW0nQu EczwE2iV3WPwuSYUCKEJv0a4n+n4vYkgT4Nwy4lMoXOWbRaf7gIcxcyEYTeYWblVFxMK eAAGJEh5S7PS2rwiF70EujPygKqvSiEx5Tif8RR/3Iqkvx44tQ5gF9tYn/3xalRxkqQP 7VmQ== 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-language; bh=bv2N0cGlA45wV6kzzv1FBVNeF0NKvqFbAQcDTDqZRp8=; b=ev2HF1g/heS/qJQbq6foK1KJ6aU6qCjubEGc+Hp2AEdFoNE8rglT2rraCR0MPMShWl X9tstGvMWMFJCu/nLquLnK2amu+BUQVXyqIsKg+bacai087f1Nk6RYqbMgvdMcl2064M X/LCMLeHvinKmWVF/qaciB/QEu+pPk+7GOX/HNNPx9durz4oWBdaN8N6QfreBSeaoRyS /3/nZJ2kyxxYkkOSMue5VjNs3HQyPJF63aSn5uxg/D+jub2l7/9BmUfuOTGcZ2gH0q0k pDd1CM2f6pQFq6CSuW54Ayoqg9pEhhv8vtb3D4s+XONCenHGKUf2+/ajHYcFF/AU22FP rKZw== X-Gm-Message-State: AOAM5313wdJAQCZP4EJz372yRzhxVBbDf2i+4SD8EFwHa4fqzR5aHylx 6e+BFT1K1E5zhm6+NWh5mnbWSIwAAflp+bRPle3Vp24dSFSeCSXnzjkbPDuxzQLpBXsgs6DYUUq QnxqeKeJ+sdxuttpjZcsd3VvCxEUxiH19hNy27FgCbfzXBKauqJBLbnadjP825znUV92zvLlEJL Wrn9c4A+AfkNIUDcaJ5HFzBCwy4qJHEi2nvHFThAyYYXo3kwip9Kw90DUBOERkU8RnFGGX5sSnQ pnLulaBQmJoOX09Q1bgDdeP6hjnl1VsbUbWQw== X-Google-Smtp-Source: ABdhPJyHKu3344HVXhtnKWnQEJLkZ8zMuAx2ar2ETc8UeXTU4sZxh8IkMPWyBEqb24fWMeulN6ZNog== X-Received: by 2002:a17:90b:11d4:: with SMTP id gv20mr24331161pjb.200.1626692670860; Mon, 19 Jul 2021 04:04:30 -0700 (PDT) Received: from localhost.localdomain ([45.113.251.168]) by smtp.gmail.com with ESMTPSA id n23sm21089565pgv.76.2021.07.19.04.04.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 04:04:30 -0700 (PDT) Subject: Re: refactoring basebackup.c To: Robert Haas , Mark Dilger Cc: "pgsql-hackers@postgresql.org" References: <58D2BD01-B541-4032-9C0B-B6143841E7ED@enterprisedb.com> From: tushar Message-ID: Date: Mon, 19 Jul 2021 16:34:27 +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: multipart/alternative; boundary="------------5FB2406A6882A40A4387C58E" 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 This is a multi-part message in MIME format. --------------5FB2406A6882A40A4387C58E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 7/8/21 9:26 PM, Robert Haas wrote: > Here at last is a new version. if i try to perform pg_basebackup using "-t server " option against localhost V/S remote machine , i can see difference in backup size. data directory whose size is [edb@centos7tushar bin]$ du -sch data/ 578M    data/ 578M    total -h=localhost [edb@centos7tushar bin]$ ./pg_basebackup -t server:/tmp/all_data2*-h localhost*   -Xnone --no-manifest -P -v pg_basebackup: initiating base backup, waiting for checkpoint to complete pg_basebackup: checkpoint completed NOTICE:  all required WAL segments have been archived 329595/329595 kB (100%), 1/1 tablespace pg_basebackup: base backup completed [edb@centos7tushar bin]$ du -sch /tmp/all_data2 322M    /tmp/all_data2 322M    total [edb@centos7tushar bin]$ -h=remote [edb@centos7tushar bin]$ ./pg_basebackup -t server:/tmp/all_data2 *-h * -Xnone --no-manifest -P -v pg_basebackup: initiating base backup, waiting for checkpoint to complete pg_basebackup: checkpoint completed NOTICE:  all required WAL segments have been archived 170437/170437 kB (100%), 1/1 tablespace pg_basebackup: base backup completed [edb@0 bin]$ du -sch /tmp/all_data2 167M    /tmp/all_data2 167M    total [edb@0 bin]$ -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company --------------5FB2406A6882A40A4387C58E Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 7/8/21 9:26 PM, Robert Haas wrote:
Here at last is a new version.
if i try to perform pg_basebackup using "-t server " option against localhost V/S remote machine ,
i can see difference in backup size.

data directory whose size is

[edb@centos7tushar bin]$ du -sch data/
578M    data/
578M    total

-h=localhost

[edb@centos7tushar bin]$ ./pg_basebackup -t server:/tmp/all_data2 -h localhost   -Xnone --no-manifest -P -v
pg_basebackup: initiating base backup, waiting for checkpoint to complete
pg_basebackup: checkpoint completed
NOTICE:  all required WAL segments have been archived                          
329595/329595 kB (100%), 1/1 tablespace                                        
pg_basebackup: base backup completed

[edb@centos7tushar bin]$ du -sch /tmp/all_data2
322M    /tmp/all_data2
322M    total
[edb@centos7tushar bin]$

-h=remote

[edb@centos7tushar bin]$ ./pg_basebackup -t server:/tmp/all_data2 -h <remote IP> -Xnone --no-manifest -P -v
pg_basebackup: initiating base backup, waiting for checkpoint to complete
pg_basebackup: checkpoint completed
NOTICE:  all required WAL segments have been archived                          
170437/170437 kB (100%), 1/1 tablespace                                        
pg_basebackup: base backup completed

[edb@0 bin]$ du -sch /tmp/all_data2
167M    /tmp/all_data2
167M    total
[edb@0 bin]$

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