@ -42,6 +42,9 @@ traverse_datadir(const char *datadir, process_file_callback_t callback)
/*
/*
* recursive part of traverse_datadir
* recursive part of traverse_datadir
*
* parent_path is the current subdirectory ' s path relative to datadir ,
* or NULL at the top level .
*/
*/
static void
static void
recurse_dir ( const char * datadir , const char * parentpath ,
recurse_dir ( const char * datadir , const char * parentpath ,
@ -127,9 +130,11 @@ recurse_dir(const char *datadir, const char *parentpath,
/*
/*
* If it ' s a symlink within pg_tblspc , we need to recurse into it ,
* If it ' s a symlink within pg_tblspc , we need to recurse into it ,
* to process all the tablespaces .
* to process all the tablespaces . We also follow a symlink if
* it ' s for pg_xlog . Symlinks elsewhere are ignored .
*/
*/
if ( strcmp ( parentpath , " pg_tblspc " ) = = 0 )
if ( ( parentpath & & strcmp ( parentpath , " pg_tblspc " ) = = 0 ) | |
strcmp ( path , " pg_xlog " ) = = 0 )
recurse_dir ( datadir , path , callback ) ;
recurse_dir ( datadir , path , callback ) ;
# else
# else
pg_fatal ( " \" %s \" is a symbolic link, but symbolic links are not supported on this platform \n " ,
pg_fatal ( " \" %s \" is a symbolic link, but symbolic links are not supported on this platform \n " ,