Re: refactoring basebackup.c

From: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: refactoring basebackup.c
Date: 2021-07-19 12:32:43
Message-ID: 1cee30a1-b7db-41fa-7ec7-4e2750e5132d@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)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(at)centos7tushar bin]$

OR

[edb(at)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(at)centos7tushar bin]$

Please refer this scenario ,where -R option is working with '-t server'
but not with -Ft

--not working

[edb(at)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(at)centos7tushar bin]$ ./pg_basebackup --server-compression=gzip4 -t  
server:/tmp/ccv    -Xnone  -R --no-manifest
NOTICE:  all required WAL segments have been archived
[edb(at)centos7tushar bin]$

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2021-07-19 13:10:46 Re: [PATCH] Use optimized single-datum tuplesort in ExecSort
Previous Message John Naylor 2021-07-19 12:15:20 Re: O_DIRECT on macOS