[postgresql] postgresql-setup: add $PGSETUP_INITDB_OPTIONS
Pavel Raiskup
praiskup at fedoraproject.org
Mon Jan 20 08:49:52 UTC 2014
commit 2f213ebd1d3b8120b0d132902a5064ef2d1548a4
Author: Pavel Raiskup <praiskup at redhat.com>
Date: Thu Jan 9 09:45:02 2014 +0100
postgresql-setup: add $PGSETUP_INITDB_OPTIONS
Users may now specify by this variable parameters passed to initdb
run. See `man initdb(1)`. This may help if user gets stacked
with bug #1007802.
Related: #1007802
Version: 9.3.2-4
postgresql-setup | 6 ++++--
postgresql.spec | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/postgresql-setup b/postgresql-setup
index 8fd509b..1348e1c 100644
--- a/postgresql-setup
+++ b/postgresql-setup
@@ -80,8 +80,10 @@ perform_initdb(){
fi
# Initialize the database
- $SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident'" \
- >> "$PGLOG" 2>&1 < /dev/null
+ initdbcmd="$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident'"
+ initdbcmd+=" $PGSETUP_INITDB_OPTIONS"
+
+ $SU -l postgres -c "$initdbcmd" >> "$PGLOG" 2>&1 < /dev/null
# Create directory for postmaster log files
mkdir "$PGDATA/pg_log"
diff --git a/postgresql.spec b/postgresql.spec
index 39db8b5..370411c 100644
--- a/postgresql.spec
+++ b/postgresql.spec
@@ -1125,6 +1125,7 @@ fi
%changelog
* Mon Jan 13 2014 Pavel Raiskup <praiskup at redhat.com> - 9.3.2-4
- postgresql-setup(upgrade): don't stop old server when it can not be started
+- postgresql-setup(initdb, upgrade): add $PGSETUP_INITDB_OPTIONS
* Fri Jan 10 2014 Pavel Raiskup <praiskup at redhat.com> - 9.3.2-3
- build with -O3 on ppc64 (private #1051075)
More information about the scm-commits
mailing list