File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -3494,6 +3494,30 @@ check_external_for_tablespaces(parray *external_list)
3494
3494
}
3495
3495
}
3496
3496
PQclear (res );
3497
+
3498
+ /* Check that external directories do not overlap */
3499
+ if (parray_num (external_list ) < 2 )
3500
+ return ;
3501
+
3502
+ for (i = 0 ; i < parray_num (external_list ); i ++ )
3503
+ {
3504
+ char * external_path = parray_get (external_list , i );
3505
+
3506
+ for (j = 0 ; j < parray_num (external_list ); j ++ )
3507
+ {
3508
+ char * tmp_external_path = parray_get (external_list , j );
3509
+
3510
+ /* skip yourself */
3511
+ if (j == i )
3512
+ continue ;
3513
+
3514
+ if (path_is_prefix_of_path (external_path , tmp_external_path ))
3515
+ elog (ERROR , "External directory path (-E option) \"%s\" "
3516
+ "contain another external directory \"%s\"" ,
3517
+ external_path , tmp_external_path );
3518
+
3519
+ }
3520
+ }
3497
3521
}
3498
3522
3499
3523
/* Get index list for given database */
You can’t perform that action at this time.
0 commit comments