blob: 95ff14e57af049dd6ab6395e757a39ddedc19a1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
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.3/data"
Additionally, a logrotation script and init script are included.
For production level log file handling please read
http://www.postgresql.org/docs/9.3/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/9.3/static/app-pg-ctl.html
From PostgreSQL 9.3 we support in place database upgrades using pg_upgrade:
http://www.postgresql.org/docs/9.3/static/pgupgrade.html
A few hints for PostgreSQL 9.2 -> 9.3 upgrade:
- Don't remove old PostgreSQL 9.2.x package
- Install PostgreSQL 9.3, note that binaries are in
'/usr/lib64/postgresql/9.3/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.3.0-x86_64-1_SBo' (doinst.sh script)
from filesystem root, to create symlinks in /usr/bin to PostgreSQL binaries
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.
|