mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-28 15:21:00 +02:00
system/postgresql: Use same data dir for all 14.x releases.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
2e1e179158
commit
b5d00d92da
3 changed files with 14 additions and 16 deletions
|
@ -1,14 +1,14 @@
|
|||
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/14.1/data --locale=en_US.UTF-8 -A md5 -W"
|
||||
# su postgres -c "initdb -D /var/lib/pgsql/14/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/14/interactive/logfile-maintenance.html
|
||||
https://www.postgresql.org/docs/14/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
|
||||
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
|
||||
the following files:
|
||||
|
||||
/etc/rc.d/rc.local
|
||||
|
@ -28,20 +28,18 @@ 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/14/app-pg-ctl.html
|
||||
See https://www.postgresql.org/docs/14/app-pg-ctl.html
|
||||
|
||||
From PostgreSQL 9.6 we support in place database upgrades using pg_upgrade:
|
||||
http://www.postgresql.org/docs/14/pgupgrade.html
|
||||
From PostgreSQL 9.3 we support in place database upgrades using pg_upgrade:
|
||||
https://www.postgresql.org/docs/14/pgupgrade.html
|
||||
|
||||
A few hints for PostgreSQL 9.6 -> X.Y upgrade:
|
||||
- Don't remove old PostgreSQL 9.6.x package
|
||||
- Install PostgreSQL X.Y, note that binaries are in
|
||||
'/usr/lib64/postgresql/X.Y/bin'
|
||||
A few hints for PostgreSQL 10.x -> 14.x upgrade:
|
||||
- Don't remove old PostgreSQL 10.x package
|
||||
- Install PostgreSQL 14.x, note that binaries are in
|
||||
'/usr/lib64/postgresql/14/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
|
||||
- Check the /usr/bin for stale symlinks for old binaries_
|
||||
e.g. in v10.0 pg_xlogdump got renamed to pg_waldump.
|
||||
|
||||
This script builds postgresql with some useful extension modules from
|
||||
the contrib directory, see PG_EXTENSIONS in SlackBuild file.
|
||||
|
|
|
@ -32,7 +32,7 @@ BUILD=${BUILD:-1}
|
|||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
PG_VERSION=${PG_VERSION:-14.1}
|
||||
PG_VERSION=${PG_VERSION:-14}
|
||||
PG_PORT=${PG_PORT:-5432}
|
||||
PG_UID=${PG_UID:-209}
|
||||
PG_GID=${PG_GID:-209}
|
||||
|
|
|
@ -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=10.2 PG_PORT=6432 /etc/rc.d/rc.@PRGNAM@ start
|
||||
# e.g. PG_VERSION=14 PG_PORT=6432 /etc/rc.d/rc.@PRGNAM@ start
|
||||
|
||||
PG_VERSION=${PG_VERSION:-@PG_VERSION@}
|
||||
PG_PORT=${PG_PORT:-@PG_PORT@}
|
||||
|
@ -43,7 +43,7 @@ PIDFILE=$DATADIR/postmaster.pid
|
|||
|
||||
# oom-killer score
|
||||
#
|
||||
# http://www.postgresql.org/docs/10.2/static/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT
|
||||
# https://www.postgresql.org/docs/14/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
|
||||
|
|
Loading…
Reference in a new issue