Re: refactoring basebackup.c

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>
Cc: Dilip Kumar <dilipbalaut(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>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
Subject: Re: refactoring basebackup.c
Date: 2021-10-07 16:07:28
Message-ID: CA+Tgmobz6tuv5tr-WxURe5JA1vVcGz85k4kkvoWxcyHvDpEqFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 7, 2021 at 7:50 AM Jeevan Ladhe
<jeevan(dot)ladhe(at)enterprisedb(dot)com> wrote:
> I think the patch v6-0007-Support-base-backup-targets.patch has broken
> the case for multiple tablespaces. When I tried to take the backup
> for target 'none' and extract the base.tar I was not able to locate
> tablespace_map file.
>
> I debugged and figured out in normal tar backup i.e. '-Ft' case
> pg_basebackup command is sent with TABLESPACE_MAP to the server:
> BASE_BACKUP ( LABEL 'pg_basebackup base backup', PROGRESS,
> TABLESPACE_MAP, MANIFEST 'yes', TARGET 'client')
>
> But, with the target command i.e. "pg_basebackup -t server:/tmp/data_v1
> -Xnone", we are not sending the TABLESPACE_MAP, here is how the command
> is sent:
> BASE_BACKUP ( LABEL 'pg_basebackup base backup', PROGRESS, MANIFEST
> 'yes', TARGET 'server', TARGET_DETAIL '/tmp/data_none')
>
> I am attaching a patch to fix this issue.

Thanks. Here's a new patch set incorporating that change. I committed
the preparatory patches to add an extensible options syntax for
CREATE_REPLICATION_SLOT and BASE_BACKUP, so those patches are no
longer included in this patch set. Barring objections, I will also
push 0001, a small preparatory refactoring patch, soon.

--
Robert Haas
EDB: http://www.enterprisedb.com

Attachment Content-Type Size
v7-0001-Refactor-basebackup.c-s-_tarWriteDir-function.patch application/octet-stream 4.0 KB
v7-0004-Modify-pg_basebackup-to-use-a-new-COPY-subprotoco.patch application/octet-stream 33.8 KB
v7-0005-Support-base-backup-targets.patch application/octet-stream 32.2 KB
v7-0006-WIP-Server-side-gzip-compression.patch application/octet-stream 17.7 KB
v7-0003-Introduce-bbstreamer-abstraction-to-modularize-pg.patch application/octet-stream 80.3 KB
v7-0002-Introduce-bbsink-abstraction-to-modularize-base-b.patch application/octet-stream 76.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-10-07 16:23:49 Re: plperl: update ppport.h and fix configure version check
Previous Message Stephen Frost 2021-10-07 16:05:19 Re: Role Self-Administration