Re: [HACKERS] [patch] reorder tablespaces in basebackup tar streamfor backup_label

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] [patch] reorder tablespaces in basebackup tar streamfor backup_label
Дата
Msg-id CA+TgmobavqABMHDiOd1CC_aL21xAqqNHZKi-pmet3DG+aNizhA@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] [patch] reorder tablespaces in basebackup tar stream forbackup_label  (Michael Banck <michael.banck@credativ.de>)
Ответы Re: [HACKERS] [patch] reorder tablespaces in basebackup tar streamfor backup_label  (Michael Banck <michael.banck@credativ.de>)
Список pgsql-hackers
On Tue, Feb 21, 2017 at 3:47 PM, Michael Banck
<michael.banck@credativ.de> wrote:
> 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. If they make a big tarball for the whole cluster potentially
> including all external tablespaces, then the backup_label file is
> somewhere in the middle of it and it takes a long time for tar to
> extract it.
>
> So I am proposing the attached patch, which sends the base tablespace
> first, and then all the other external tablespaces afterwards, thus
> having base_backup be the first file in the tar in all cases. Does
> anybody see a problem with that?

Please add this to commitfest.postgresql.org so it doesn't get forgotten.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] mat views stats
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Should logtape.c blocks be of type long?