summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--postgresql-ctl.in5
-rw-r--r--postgresql.init.in6
3 files changed, 13 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index c2d0c5c..d2062f4 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,10 @@ New in 3.0 version
* The starting timeout is now configurable via PGSTARTTIMEOUT.
+* Service file and initscript now support running of PostgreSQL extensions
+ built against specific software collections, specified by PGSCLS
+ environment variable.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 2.0 version
diff --git a/postgresql-ctl.in b/postgresql-ctl.in
index 546ffba..ad18004 100644
--- a/postgresql-ctl.in
+++ b/postgresql-ctl.in
@@ -17,6 +17,11 @@
@SCL_SOURCE@
+# Help users to run postgresql server extensions built against specific
+# software collection (that said, such collection is runtime dependancy of
+# such extension, not the server itself).
+test -n "$PGSCLS" && source scl_source enable $PGSCLS
+
port=()
if test "$1" = "start" && test -n "$PGPORT"; then
port=(-o "-p $PGPORT")
diff --git a/postgresql.init.in b/postgresql.init.in
index ca0909e..7fca5f3 100644
--- a/postgresql.init.in
+++ b/postgresql.init.in
@@ -74,6 +74,7 @@ PG_OOM_ADJ=-17
export PGDATA
export PGPORT
export PGSTARTTIMEOUT
+export PGSCLS
lockfile="/var/lock/subsys/${NAME}"
@@ -117,8 +118,9 @@ start()
# the system too long. See `man pg_ctl & -w option`. This is not issue in
# case of systemd.
- run_cmd_as_dbadmin \
- "@libexecdir@/postgresql-ctl start -D ${PGDATA} -s \
+ run_cmd_as_dbadmin "\
+ PGSCLS='${PGSCLS}' \
+ @libexecdir@/postgresql-ctl start -D ${PGDATA} -s \
-w -t ${PGSTARTTIMEOUT-30}" \
"$PGLOG" "$PGLOG"