Re: [patch] reorder tablespaces in basebackup tar streamfor backup_label - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: [patch] reorder tablespaces in basebackup tar streamfor backup_label
Date
Msg-id CAHGQGwHkRCvdC7Yfq6stSZ1SPVdOz=_TJ1VQcvcM+H4XiCriiQ@mail.gmail.com
Whole thread Raw
In response to [HACKERS] [patch] reorder tablespaces in basebackup tar stream forbackup_label  (Michael Banck <michael.banck@credativ.de>)
Responses Re: [patch] reorder tablespaces in basebackup tar streamfor backup_label
List pgsql-hackers
On Tue, Feb 21, 2017 at 7:17 PM, Michael Banck
<michael.banck@credativ.de> wrote:
> Hi,
>
> currently, the backup_label and (I think) the tablespace_map files are
> (by design) conveniently located at the beginning of the main tablespace
> tarball when making a basebackup. However, (by accident or also by
> design?) the main tablespace is the last tarball[1] to be streamed via
> the BASE_BACKUP replication protocol command.
>
> For pg_basebackup, this is not a real problem, as either each tablespace
> is its own tarfile (in tar format mode), or the files are extracted
> anyway (in plain mode).
>
> However, third party tools using the BASE_BACKUP command might want to
> extract the backup_label, e.g. in order to figure out the START WAL
> LOCATION.

The first result set that BASE BACKUP sends back to a client contains
the START WAL LOCATION. So at first, ISTM that you don't need backup_label
for that purpose.

If your need other information except START WAL LOCATION at the beginning of
base backup and they are very useful for many third-party softwares,
you can add them into that first result set. If you do this, you can
retrieve them
at the beginning even when WAL files are included in the backup.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Protection lost in expression eval changeover
Next
From: Pavel Stehule
Date:
Subject: Re: PoC plpgsql - possibility to force custom or generic plan