summaryrefslogtreecommitdiff
path: root/src/bin/initdb/initdb.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/initdb/initdb.sh')
-rw-r--r--src/bin/initdb/initdb.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh
index 139c967b05..63733a5f7e 100644
--- a/src/bin/initdb/initdb.sh
+++ b/src/bin/initdb/initdb.sh
@@ -26,7 +26,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.60 1999/05/20 16:50:06 wieck Exp $
+# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.61 1999/10/06 21:58:12 vadim Exp $
#
#-------------------------------------------------------------------------
@@ -300,6 +300,12 @@ else
mkdir $PGDATA/base
if [ $? -ne 0 ]; then exit 5; fi
fi
+ if [ ! -d $PGDATA/pg_xlog ]; then
+ echo "Creating Postgres database XLOG directory $PGDATA/pg_xlog"
+ echo
+ mkdir $PGDATA/pg_xlog
+ if [ $? -ne 0 ]; then exit 5; fi
+ fi
fi
#----------------------------------------------------------------------------
@@ -316,6 +322,7 @@ else
fi
BACKENDARGS="-boot -C -F -D$PGDATA $BACKEND_TALK_ARG"
+FIRSTRUN="-boot -x -C -F -D$PGDATA $BACKEND_TALK_ARG"
echo "Creating template database in $PGDATA/base/template1"
[ "$debug" -ne 0 ] && echo "Running: postgres $BACKENDARGS template1"
@@ -323,7 +330,7 @@ echo "Creating template database in $PGDATA/base/template1"
cat $TEMPLATE \
| sed -e "s/postgres PGUID/$POSTGRES_SUPERUSERNAME $POSTGRES_SUPERUID/" \
-e "s/PGUID/$POSTGRES_SUPERUID/" \
-| postgres $BACKENDARGS template1
+| postgres $FIRSTRUN template1
if [ $? -ne 0 ]; then
echo "$CMDNAME: could not create template database"