On Wed, Mar 28, 2018 at 7:54 AM, Michael Paquier <mich...@paquier.xyz> wrote: > 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.
Okay, I revived that change in the doc. >> 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. Committed. Thanks! Regards, -- Fujii Masao