Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30b2d28 commit a7cdfdfCopy full SHA for a7cdfdf
src/bin/pg_dump/pg_upgrade
@@ -1,4 +1,8 @@
1
-:
+#!/bin/sh
2
+#
3
+# pg_upgrade: update a database without needing a full dump/reload cycle
4
+# CAUTION: read the manual page before trying to use this!
5
+
6
trap "rm -f /tmp/$$" 0 1 2 3 15
7
8
if [ "$#" -eq 0 ]
@@ -67,6 +71,11 @@ cat $INPUT | awk ' {
67
71
68
72
psql "template1" <"/tmp/$$"
69
73
74
+if [ $? -ne 0 ]
75
+then echo "psql failed to execute $INPUT script." 1>&2
76
+ exit 1
77
+fi
78
70
79
for DIR in data/base/*
80
do
81
BASEDIR="`basename $DIR`"
@@ -86,4 +95,4 @@ done
86
95
mv $OLDDIR/pg_log data
87
96
mv $OLDDIR/pg_variable data
88
97
89
-echo "You may removed the $OLDDIR directory with 'rm -r $OLDDIR'."
98
+echo "You may remove the $OLDDIR directory with 'rm -r $OLDDIR'."
0 commit comments