summaryrefslogtreecommitdiff
path: root/src/bin/initdb
diff options
context:
space:
mode:
authorVadim B. Mikheev1999-10-06 21:58:18 +0000
committerVadim B. Mikheev1999-10-06 21:58:18 +0000
commit47937403676d913c0e740eec6b85113865c6c8ab (patch)
tree901b2566b404316b964f13c6a9477bb0fde7c285 /src/bin/initdb
parent9dcd8c528fe08d3a442db46ad2045ff2183fc6a3 (diff)
XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.
First step in cleaning up backend initialization code. Fix for FATAL: now FATAL is ERROR + exit.
Diffstat (limited to 'src/bin/initdb')
-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 139c967b05c..63733a5f7ea 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"