mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 16:01:23 +02:00
initdb didn't load pg_description
This commit is contained in:
parent
e419b48217
commit
bfa3b59d25
@ -26,17 +26,18 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.77 1999/12/22 04:23:31 ishii Exp $
|
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.78 2000/01/13 18:22:10 petere Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
exit_nicely(){
|
exit_nicely(){
|
||||||
echo
|
echo
|
||||||
echo "$CMDNAME failed."
|
echo "$CMDNAME failed."
|
||||||
if [ "$noclean" -eq 0 ]
|
if [ "$noclean" -eq 0 ]; then
|
||||||
then
|
|
||||||
echo "Removing $PGDATA."
|
echo "Removing $PGDATA."
|
||||||
rm -rf "$PGDATA" || echo "Failed."
|
rm -rf "$PGDATA" || echo "Failed."
|
||||||
|
echo "Removing temp file $TEMPFILE."
|
||||||
|
rm -rf "$TEMPFILE" || echo "Failed."
|
||||||
else
|
else
|
||||||
echo "Data directory $PGDATA will not be removed at user's request."
|
echo "Data directory $PGDATA will not be removed at user's request."
|
||||||
fi
|
fi
|
||||||
@ -53,7 +54,11 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
EffectiveUser=`id -n -u 2>/dev/null || whoami 2>/dev/null`
|
EffectiveUser=`id -n -u 2>/dev/null || whoami 2>/dev/null`
|
||||||
TEMPFILE="/tmp/initdb.$$"
|
if [ "$TMPDIR" ]; then
|
||||||
|
TEMPFILE="$TMPDIR/initdb.$$"
|
||||||
|
else
|
||||||
|
TEMPFILE="/tmp/initdb.$$"
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Find out where we're located
|
# Find out where we're located
|
||||||
@ -547,10 +552,17 @@ echo "CREATE VIEW pg_indexes AS \
|
|||||||
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
|
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
|
||||||
|
|
||||||
echo "Loading pg_description."
|
echo "Loading pg_description."
|
||||||
echo "COPY pg_description FROM '$TEMPLATE_DESCR'" \
|
echo "COPY pg_description FROM STDIN" > $TEMPFILE
|
||||||
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
|
cat "$TEMPLATE_DESCR" >> $TEMPFILE
|
||||||
echo "COPY pg_description FROM '$GLOBAL_DESCR'" \
|
cat "$GLOBAL_DESCR" >> $TEMPFILE
|
||||||
|
|
||||||
|
cat $TEMPFILE \
|
||||||
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
|
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
|
||||||
|
if [ "$noclean" -eq 0 ]
|
||||||
|
then
|
||||||
|
rm -f "$TEMPFILE" || exit_nicely
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Vacuuming database."
|
echo "Vacuuming database."
|
||||||
echo "VACUUM ANALYZE" \
|
echo "VACUUM ANALYZE" \
|
||||||
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
|
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
|
||||||
|
Loading…
Reference in New Issue
Block a user