slackbuilds_ponce/system/postgresql/README.SBo
Adis Nezirovic 0023a1b9b9 system/postgresql: Updated for version 10.2.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
2018-02-17 07:42:53 +07:00

64 lines
2.5 KiB
Text

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/10.2/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/10.2/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
the following files:
/etc/rc.d/rc.local
==================
# Startup postgresql
if [ -x /etc/rc.d/rc.postgresql ]; then
/etc/rc.d/rc.postgresql start
fi
/etc/rc.d/rc.local_shutdown
===========================
# Stop postgres
if [ -x /etc/rc.d/rc.postgresql ]; then
/etc/rc.d/rc.postgresql stop
fi
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/10.2/static/app-pg-ctl.html
From PostgreSQL 9.3 we support in place database upgrades using pg_upgrade:
http://www.postgresql.org/docs/10.2/static/pgupgrade.html
A few hints for PostgreSQL 9.6 -> 10.2 upgrade:
- Don't remove old PostgreSQL 9.6.x package
- Install PostgreSQL 10.2.x, note that binaries are in
'/usr/lib64/postgresql/10.2/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.
To build PostgreSQL with all extensions, use the following command:
# PG_EXTENSIONS=ALL ./postgresql.SlackBuild
Please note that in order to actually use extension, you must execute
'CREATE EXTENSION [ IF NOT EXISTS ] extension_name' for each extension.
OpenLDAP Notes
With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
also uses LDAP will crash on exit.
The LDAP wont be enabled (regardless of '--with-ldap' flag in slackbuild)
for affected OpenLDAP versions, so we've removed that build flag alltogether.
(OpenLDAP 2.4.31 is the version included in Slackware 14.1)