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

Commit505b2ec

Browse files
committed
I attach a patch for pg_upgrade. This does two things:
1. check whether the program is being executed in $PGDATA/.. This is necessary if the data tree is not in the standard place, as is the case with the Debian distribution (because of Debian policy).2. give a clearer error message if the dumped data structure fails to be loaded.Oliver Elphick
1 parent094616e commit505b2ec

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/bin/pg_dump/pg_upgrade

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ OLDDIR="$1"
2929

3030
# check things
3131

32-
if [!-f"./lib/global1.bki.source" ]
33-
thenecho"$0 must be run from the top of the postgres directory tree."1>&2
32+
if [!-f"./data/PG_VERSION" ]
33+
thenecho"`basename$0` must be run from the directory containing
34+
the database directory\`data' (`dirname$PGDATA`.)"1>&2
3435
exit 1
3536
fi
3637

@@ -72,7 +73,8 @@ cat $INPUT | awk '{
7273
psql"template1"<"/tmp/$$"
7374

7475
if [$?-ne 0 ]
75-
thenecho"psql failed to execute$INPUT script."1>&2
76+
thenecho"There were errors in the input script$INPUT.
77+
$0 aborted."1>&2
7678
exit 1
7779
fi
7880

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp