mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
initdb didn't always remove temp file
This commit is contained in:
@ -26,7 +26,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.90 2000/04/08 18:35:29 momjian Exp $
|
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.91 2000/04/25 08:29:02 petere Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -476,10 +476,7 @@ then
|
|||||||
"$PGPATH"/postgres $BACKENDARGS template1 < "$TEMPFILE"
|
"$PGPATH"/postgres $BACKENDARGS template1 < "$TEMPFILE"
|
||||||
# Gotta remove that temp file before exiting on error.
|
# Gotta remove that temp file before exiting on error.
|
||||||
retval="$?"
|
retval="$?"
|
||||||
if [ "$noclean" -eq 0 ]
|
rm -f "$TEMPFILE" || exit_nicely
|
||||||
then
|
|
||||||
rm -f "$TEMPFILE" || exit_nicely
|
|
||||||
fi
|
|
||||||
[ "$retval" -ne 0 ] && exit_nicely
|
[ "$retval" -ne 0 ] && exit_nicely
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -596,10 +593,7 @@ cat "$GLOBAL_DESCR" >> $TEMPFILE
|
|||||||
|
|
||||||
cat $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 ]
|
rm -f "$TEMPFILE" || exit_nicely
|
||||||
then
|
|
||||||
rm -f "$TEMPFILE" || exit_nicely
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Vacuuming database."
|
echo "Vacuuming database."
|
||||||
echo "VACUUM ANALYZE" \
|
echo "VACUUM ANALYZE" \
|
||||||
|
Reference in New Issue
Block a user