Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc509ae4

Browse files
committed
backup: sanity check that external directories do not overlap
1 parent323add2 commitc509ae4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

‎src/backup.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3494,6 +3494,30 @@ check_external_for_tablespaces(parray *external_list)
34943494
}
34953495
}
34963496
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+
}
34973521
}
34983522

34993523
/* Get index list for given database */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp