@@ -30,7 +30,7 @@ static char *datasegpath(RelFileNode rnode, ForkNumber forknum,
3030static int path_cmp (const void * a , const void * b );
3131static int final_filemap_cmp (const void * a , const void * b );
3232static void filemap_list_to_array (filemap_t * map );
33- static bool check_file_excluded (const char * path , const char * type );
33+ static bool check_file_excluded (const char * path , bool is_source );
3434
3535/*
3636 * The contents of these directories are removed or recreated during server
@@ -148,7 +148,7 @@ process_source_file(const char *path, file_type_t type, size_t newsize,
148148 Assert (map -> array == NULL );
149149
150150 /* ignore any path matching the exclusion filters */
151- if (check_file_excluded (path , "source" ))
151+ if (check_file_excluded (path , true ))
152152 return ;
153153
154154 /*
@@ -338,7 +338,7 @@ process_target_file(const char *path, file_type_t type, size_t oldsize,
338338 * mandatory for target files, but this does not hurt and let's be
339339 * consistent with the source processing.
340340 */
341- if (check_file_excluded (path , "target" ))
341+ if (check_file_excluded (path , false ))
342342 return ;
343343
344344 snprintf (localpath , sizeof (localpath ), "%s/%s" , datadir_target , path );
@@ -490,7 +490,7 @@ process_block_change(ForkNumber forknum, RelFileNode rnode, BlockNumber blkno)
490490 * Is this the path of file that pg_rewind can skip copying?
491491 */
492492static bool
493- check_file_excluded (const char * path , const char * type )
493+ check_file_excluded (const char * path , bool is_source )
494494{
495495 char localpath [MAXPGPATH ];
496496 int excludeIdx ;
@@ -506,8 +506,12 @@ check_file_excluded(const char *path, const char *type)
506506 filename ++ ;
507507 if (strcmp (filename , excludeFiles [excludeIdx ]) == 0 )
508508 {
509- pg_log (PG_DEBUG , "entry \"%s\" excluded from %s file list\n" ,
510- path , type );
509+ if (is_source )
510+ pg_log (PG_DEBUG , "entry \"%s\" excluded from source file list\n" ,
511+ path );
512+ else
513+ pg_log (PG_DEBUG , "entry \"%s\" excluded from target file list\n" ,
514+ path );
511515 return true;
512516 }
513517 }
@@ -522,8 +526,12 @@ check_file_excluded(const char *path, const char *type)
522526 excludeDirContents [excludeIdx ]);
523527 if (strstr (path , localpath ) == path )
524528 {
525- pg_log (PG_DEBUG , "entry \"%s\" excluded from %s file list\n" ,
526- path , type );
529+ if (is_source )
530+ pg_log (PG_DEBUG , "entry \"%s\" excluded from source file list\n" ,
531+ path );
532+ else
533+ pg_log (PG_DEBUG , "entry \"%s\" excluded from target file list\n" ,
534+ path );
527535 return true;
528536 }
529537 }
0 commit comments