aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/postgresql/README.SBo18
-rw-r--r--system/postgresql/postgresql.SlackBuild26
-rw-r--r--system/postgresql/postgresql.info6
-rw-r--r--system/postgresql/rc.postgresql.new20
4 files changed, 34 insertions, 36 deletions
diff --git a/system/postgresql/README.SBo b/system/postgresql/README.SBo
index 894c8eb42589..e5151969e8f2 100644
--- a/system/postgresql/README.SBo
+++ b/system/postgresql/README.SBo
@@ -1,11 +1,11 @@
Before you can run postgresql you'll need to create the
database files in /var/lib/pgsql. The following should do
the trick.
- # su postgres -c "initdb -D /var/lib/pgsql/9.4/data --locale=en_US.UTF-8 -A md5 -W"
+ # su postgres -c "initdb -D /var/lib/pgsql/9.5/data --locale=en_US.UTF-8 -A md5 -W"
Additionally, a logrotation script and init script are included.
For production level log file handling please read
-http://www.postgresql.org/docs/9.4/interactive/logfile-maintenance.html
+http://www.postgresql.org/docs/9.5/interactive/logfile-maintenance.html
In order to start postgresql at boot and stop it properly at shutdown,
make sure rc.postgresql is executable and add the following lines to
@@ -28,19 +28,19 @@ the following files:
Additionally, rc.postgresql script has additional modes for stop/restart:
force-stop|force-restart (i.e. pg_ctl 'fast' mode)
unclean-stop|unclean-restart (i.e. pg_ctl 'immediate' mode)
-See http://www.postgresql.org/docs/9.4/static/app-pg-ctl.html
+See http://www.postgresql.org/docs/9.5/static/app-pg-ctl.html
From PostgreSQL 9.3 we support in place database upgrades using pg_upgrade:
- http://www.postgresql.org/docs/9.4/static/pgupgrade.html
+ http://www.postgresql.org/docs/9.5/static/pgupgrade.html
-A few hints for PostgreSQL 9.3 -> 9.4 upgrade:
- - Don't remove old PostgreSQL 9.3.x package
- - Install PostgreSQL 9.4.x, note that binaries are in
- '/usr/lib64/postgresql/9.4/bin'
+A few hints for PostgreSQL 9.4 -> 9.5 upgrade:
+ - Don't remove old PostgreSQL 9.4.x package
+ - Install PostgreSQL 9.5.x, note that binaries are in
+ '/usr/lib64/postgresql/9.5/bin'
- Follow regular pg_upgrade docs
- Remove old package when transition is over, or read comments in
rc.postgresql if you want to run multiple PostgreSQL versions in parallel
- - Run '/var/log/scripts/postgresql-9.4.x-x86_64-1_SBo' (doinst.sh script)
+ - Run '/var/log/scripts/postgresql-9.5.x-x86_64-1_SBo' (doinst.sh script)
from filesystem root, to create symlinks in /usr/bin to PostgreSQL binaries
diff --git a/system/postgresql/postgresql.SlackBuild b/system/postgresql/postgresql.SlackBuild
index f41d2e9b38e0..3fe8a37f5ed4 100644
--- a/system/postgresql/postgresql.SlackBuild
+++ b/system/postgresql/postgresql.SlackBuild
@@ -2,10 +2,10 @@
# Slackware build script for PostgreSQL
#
-# $Revision: 6560bf705e09 $
-# $Date: 2015/10/23 04:29:48 $
+# $Revision$
+# $Date$
#
-# Copyright 2007-2015 Adis Nezirovic <adis_at_linux.org.ba>
+# Copyright 2007-2016 Adis Nezirovic <adis_at_linux.org.ba>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,11 +28,11 @@
# Modified by the SlackBuilds.org Project
PRGNAM=postgresql
-VERSION=${VERSION:-9.4.5}
+VERSION=${VERSION:-9.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-PG_VERSION=${PG_VERSION:-9.4}
+PG_VERSION=${PG_VERSION:-9.5}
PG_PORT=${PG_PORT:-5432}
PG_UID=${PG_UID:-209}
PG_GID=${PG_GID:-209}
@@ -72,16 +72,16 @@ else
fi
if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686 -DLINUX_OOM_SCORE_ADJ=0"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686 -DLINUX_OOM_SCORE_ADJ=0"
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC -DLINUX_OOM_SCORE_ADJ=0"
+ SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
- SLKCFLAGS="-O2 -DLINUX_OOM_SCORE_ADJ=0"
+ SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
@@ -135,17 +135,15 @@ make install-docs DESTDIR=$PKG
)
# Some interesting additional modules:
-# http://www.postgresql.org/docs/9.4/static/contrib.html
+# http://www.postgresql.org/docs/9.5/static/contrib.html
#
# adminpack - helper extension for pgAdmin
# pgcrypto - extension for some business applications
-# hstore, ltree, xml2 - useful extensions for developers
-# pg_archivecleanup, pg_standby - high availability helpers
-# pg_upgrade, pg_upgrade_support - online upgrade between postgresql versions
+# ltree, xml2 - useful extensions for developers
# postgres_fdw - foreign-data wrapper for access to external PostgreSQL servers
# file_fdw - foreign-data wrapper for access to data files on filesystem
-PG_EXTENSIONS=${PG_EXTENSIONS:-"adminpack pgcrypto hstore ltree xml2 pg_archivecleanup pg_standby pg_upgrade pg_upgrade_support postgres_fdw file_fdw"}
+PG_EXTENSIONS=${PG_EXTENSIONS:-"adminpack pgcrypto ltree xml2 postgres_fdw file_fdw"}
if [ "x$PG_EXTENSIONS" = "xALL" ];then
cd $TMP/$PRGNAM-$VERSION/contrib
diff --git a/system/postgresql/postgresql.info b/system/postgresql/postgresql.info
index a7638c959440..276a0cc3ea35 100644
--- a/system/postgresql/postgresql.info
+++ b/system/postgresql/postgresql.info
@@ -1,8 +1,8 @@
PRGNAM="postgresql"
-VERSION="9.4.5"
+VERSION="9.5.0"
HOMEPAGE="http://www.postgresql.org"
-DOWNLOAD="http://ftp.postgresql.org/pub/source/v9.4.5/postgresql-9.4.5.tar.bz2"
-MD5SUM="8b2e3472a8dc786649b4d02d02e039a0"
+DOWNLOAD="http://ftp.postgresql.org/pub/source/v9.5.0/postgresql-9.5.0.tar.bz2"
+MD5SUM="e58fffe9359e311ead94490a06b7147c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/system/postgresql/rc.postgresql.new b/system/postgresql/rc.postgresql.new
index 74678412293e..09dabe7ec45b 100644
--- a/system/postgresql/rc.postgresql.new
+++ b/system/postgresql/rc.postgresql.new
@@ -5,7 +5,7 @@
# $Revision: 6804ca7db709 $
# $Date: 2015/03/13 21:57:14 $
#
-# Copyright 2007-2015 Adis Nezirovic <adis_at_linux.org.ba>
+# Copyright 2007-2016 Adis Nezirovic <adis_at_linux.org.ba>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -30,7 +30,7 @@
# Since version 9.3 this startup script can run multiple PostgreSQL
# versions on different ports and with different data dirs.
#
-# e.g. PG_VERSION=9.4 PG_PORT=6432 /etc/rc.d/rc.@PRGNAM@ start
+# e.g. PG_VERSION=9.5 PG_PORT=6432 /etc/rc.d/rc.@PRGNAM@ start
PG_VERSION=${PG_VERSION:-@PG_VERSION@}
PG_PORT=${PG_PORT:-@PG_PORT@}
@@ -42,12 +42,12 @@ PG_CTL=/usr/lib${LIBDIRSUFFIX}/@PRGNAM@/$PG_VERSION/bin/pg_ctl
PIDFILE=$DATADIR/postmaster.pid
# oom-killer score
-# if defined and set to -1000, main postmaster wont be killed
-# by Linux OOM killer, but individual backends still could be
-# (since OOM_SCORE_ADJ in SlackBuild is set to 0)
#
-# http://www.kernel.org/doc/Documentation/filesystems/proc.txt
-OOM_SCORE_ADJ=-1000
+# http://www.postgresql.org/docs/9.5/static/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT
+PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
+PG_MASTER_OOM_SCORE_ADJ=-1000
+PG_CHILD_OOM_SCORE_ADJ=0
+PG_ENV="PG_OOM_ADJUST_FILE=$PG_OOM_ADJUST_FILE PG_OOM_ADJUST_VALUE=$PG_CHILD_OOM_SCORE_ADJ"
# Return values (according to LSB):
# 0 - success
@@ -62,7 +62,7 @@ OOM_SCORE_ADJ=-1000
pg_ctl()
{
CMD="$PG_CTL -o '-p $PG_PORT' $@"
- su - postgres -c "$CMD"
+ su - postgres -c "$PG_ENV $CMD"
}
if [ ! -f $POSTGRES ]; then
@@ -93,7 +93,7 @@ case "$1" in
exit 1
else
- test x"$OOM_SCORE_ADJ" != x && echo "$OOM_SCORE_ADJ" > /proc/self/oom_score_adj
+ test -e "$PG_OOM_ADJUST_FILE" && echo "$PG_MASTER_OOM_SCORE_ADJ" > "$PG_OOM_ADJUST_FILE"
pg_ctl start -w -l $LOGFILE -D $DATADIR
exit 0
fi
@@ -120,7 +120,7 @@ case "$1" in
"restart")
echo "Restarting PostgreSQL..."
- test x"$OOM_SCORE_ADJ" != x && echo "$OOM_SCORE_ADJ" > /proc/self/oom_score_adj
+ test -e "$PG_OOM_ADJUST_FILE" && echo "$PG_MASTER_OOM_SCORE_ADJ" > "$PG_OOM_ADJUST_FILE"
pg_ctl restart -l $LOGFILE -D $DATADIR -m smart
;;