From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephen Frost <sfrost(at)snowman(dot)net>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Using base backup exclusion filters to reduce data transferred with pg_rewind |
Date: | 2018-03-27 22:54:59 |
Message-ID: | 20180327225459.GB1105@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2018-03-27 23:32:03 | Re: Undesirable entries in typedefs list |
Previous Message | Peter Geoghegan | 2018-03-27 22:46:33 | Re: WIP: Covering + unique indexes. |