aboutsummaryrefslogtreecommitdiffstats
path: root/postgresql-config/src/stage/opt/app
diff options
context:
space:
mode:
Diffstat (limited to 'postgresql-config/src/stage/opt/app')
-rw-r--r--postgresql-config/src/stage/opt/app/postgresql-config/etc/create-db-backup6
-rw-r--r--postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install11
-rw-r--r--postgresql-config/src/stage/opt/app/postgresql-config/etc/lock-and-create-db-backup6
-rw-r--r--postgresql-config/src/stage/opt/app/postgresql-config/lib/profile.additions6
-rw-r--r--postgresql-config/src/stage/opt/app/postgresql-config/main/postgresql.conf.orig2
5 files changed, 24 insertions, 7 deletions
diff --git a/postgresql-config/src/stage/opt/app/postgresql-config/etc/create-db-backup b/postgresql-config/src/stage/opt/app/postgresql-config/etc/create-db-backup
index 625ce57..d6e856b 100644
--- a/postgresql-config/src/stage/opt/app/postgresql-config/etc/create-db-backup
+++ b/postgresql-config/src/stage/opt/app/postgresql-config/etc/create-db-backup
@@ -15,7 +15,11 @@
if [ -d /opt/app/postgresql-9.5.2 ]
then PGDIR=/opt/app/postgresql-9.5.2
-else PGDIR=/usr/lib/postgresql/9.5
+elif [ -d /usr/lib/postgresql/9.6 ]
+then PGDIR=/usr/lib/postgresql/9.6
+elif [ -d /usr/lib/postgresql/9.5 ]
+then PGDIR=/usr/lib/postgresql/9.5
+else echo PostgreSQL bin directory not found
fi
$PGDIR/bin/psql <<-EOF
diff --git a/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install b/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
index 7e8c71b..a20edc6 100644
--- a/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
+++ b/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
@@ -28,10 +28,15 @@ die()
[ -n "$OPENECOMP" ] || die "OPENECOMP is not set"
[ -n "$NOTOPENECOMP" ] || die "NOTOPENECOMP is not set"
-if $OPENECOMP
-then export PGDIR=${INSTALL_ROOT}/usr/lib/postgresql/9.5
-else export PGDIR=${INSTALL_ROOT}/opt/app/postgresql-9.5.2
+if [ -d ${INSTALL_ROOT}/opt/app/postgresql-9.5.2 ]
+then PGDIR=${INSTALL_ROOT}/opt/app/postgresql-9.5.2
+elif [ -d ${INSTALL_ROOT}/usr/lib/postgresql/9.6 ]
+then PGDIR=${INSTALL_ROOT}/usr/lib/postgresql/9.6
+elif [ -d ${INSTALL_ROOT}/usr/lib/postgresql/9.5 ]
+then PGDIR=${INSTALL_ROOT}/usr/lib/postgresql/9.5
+else die PostgreSQL bin directory not found
fi
+export PGDIR
export DBROOT=/dbroot/pgdata/main
export PATH=$PATH:${INSTALL_ROOT}/opt/app/postgresql-prep/bin
diff --git a/postgresql-config/src/stage/opt/app/postgresql-config/etc/lock-and-create-db-backup b/postgresql-config/src/stage/opt/app/postgresql-config/etc/lock-and-create-db-backup
index ff942e6..cb8586d 100644
--- a/postgresql-config/src/stage/opt/app/postgresql-config/etc/lock-and-create-db-backup
+++ b/postgresql-config/src/stage/opt/app/postgresql-config/etc/lock-and-create-db-backup
@@ -15,7 +15,11 @@
if [ -d /opt/app/postgresql-9.5.2 ]
then PGDIR=${INSTALL_ROOT}/opt/app/postgresql-9.5.2
-else PGDIR=/usr/lib/postgresql/9.5
+elif [ -d /usr/lib/postgresql/9.6 ]
+then PGDIR=/usr/lib/postgresql/9.6
+elif [ -d /usr/lib/postgresql/9.5 ]
+then PGDIR=/usr/lib/postgresql/9.5
+else echo PostgreSQL bin directory not found
fi
export PATH=$PGDIR/bin:${INSTALL_ROOT}/opt/java/jdk/jdk170/bin:${INSTALL_ROOT}/opt/app/cdf/bin:${INSTALL_ROOT}/opt/app/pgaas/bin:$PATH
diff --git a/postgresql-config/src/stage/opt/app/postgresql-config/lib/profile.additions b/postgresql-config/src/stage/opt/app/postgresql-config/lib/profile.additions
index 3ee8128..9616494 100644
--- a/postgresql-config/src/stage/opt/app/postgresql-config/lib/profile.additions
+++ b/postgresql-config/src/stage/opt/app/postgresql-config/lib/profile.additions
@@ -1,6 +1,10 @@
if [ -d /opt/app/postgresql-9.5.2 ]
then PGDIR=/opt/app/postgresql-9.5.2
-else PGDIR=/usr/lib/postgresql/9.5
+elif [ -d /usr/lib/postgresql/9.6 ]
+then PGDIR=/usr/lib/postgresql/9.6
+elif [ -d /usr/lib/postgresql/9.5 ]
+then PGDIR=/usr/lib/postgresql/9.5
+else echo PostgreSQL bin directory not found
fi
export PATH="$PGDIR/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin:/opt/app/postgresql-prep/bin:$PATH"
diff --git a/postgresql-config/src/stage/opt/app/postgresql-config/main/postgresql.conf.orig b/postgresql-config/src/stage/opt/app/postgresql-config/main/postgresql.conf.orig
index b2587db..e930458 100644
--- a/postgresql-config/src/stage/opt/app/postgresql-config/main/postgresql.conf.orig
+++ b/postgresql-config/src/stage/opt/app/postgresql-config/main/postgresql.conf.orig
@@ -49,7 +49,7 @@ ident_file = '%CFGDIR%/main/pg_ident.conf' # for DCAE
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
-external_pid_file = '/var/run/postgresql/9.5-main.pid' # for DCAE
+external_pid_file = '/var/run/postgresql/main.pid' # for DCAE
#external_pid_file = '' # write an extra PID file
# (change requires restart)