Re: Using base backup exclusion filters to reduce data transferredwith pg_rewind

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Using base backup exclusion filters to reduce data transferredwith pg_rewind
Дата
Msg-id 20180327225459.GB1105@paquier.xyz
обсуждение исходный текст
Ответ на Re: Using base backup exclusion filters to reduce data transferredwith pg_rewind  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: Using base backup exclusion filters to reduce data transferredwith pg_rewind  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On Wed, Mar 28, 2018 at 04:13:25AM +0900, Fujii Masao wrote:
> This code is almost ok in practice, but using the check of
> "strstr(path, localpath) == path" is more robust here?

No problems with that either.

> Using the following code instead is more robust?
> This original code is almost ok in practice, though.
>
>     filename = last_dir_separator(path);
>     if (filename == NULL)
>         filename = path;
>     else
>         filename++;
>     if (strcmp(filename, excludeFiles[excludeIdx]) == 0)

Indeed, using last_dir_separator is a better idea for files.  I was
looking for something like that actually.

> +      (everything except the relation files). Similarly to base backups,
> +      the contents of the directories <filename>pg_dynshmem/</filename>,
> +      <filename>pg_notify/</filename>, <filename>pg_replslot/</filename>,
> +      <filename>pg_serial/</filename>, <filename>pg_snapshots/</filename>,
> +      <filename>pg_stat_tmp/</filename>, and
> +      <filename>pg_subtrans/</filename> are omitted from the data copied
> +      from the source cluster. Any file or directory beginning with
> +      <filename>pgsql_tmp</filename> is omitted, as well as are
> +      <filename>backup_label</filename>,
> +      <filename>tablespace_map</filename>,
> +      <filename>pg_internal.init</filename>,
> +      <filename>postmaster.opts</filename> and
> +      <filename>postmaster.pid</filename>.
>
> I don't think this description is necessary. The doc for pg_basebackup
> also doesn't seem to have this kind of description.

Those are listed in backup.sgml.  And I really think that we should at
least document that the same type of exclusion filters as base backups
are used in pg_rewind.  If you don't want to include the whole list,
then let's use a reference to backup-lowlevel-base-backup-data.

> So attached is the patch that I updated based on your patch and
> am thinking to apply.

Thanks.  Except for the documentation part, I am OK for the changes
proposed.
--
Michael

Вложения

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: WIP: Covering + unique indexes.
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Undesirable entries in typedefs list