22:29 Trying to solve problems with tablespaces.
22:23 Added user postgres to group postgres. Restarted the DB. Still not works.
22:43 Upgrading PostgreSQL.
Mince01 # su - postgres
Mince01 $ cd ~/backups
Mince01 $ pg_dumpall | bzip2 dump2011-07-11.bz2

Mince01 # yum list postgresql*
Mince01 # yum erase postgresql

22:52 Backup was removed automatically with user postgres.
22:57 Home for user postgres is /var/lib/pgsql.
Mince01 # mv /var/lib/pgsql /var/lib/pgsql_old
Mince01 # wget http://yum.pgrpms.org/9.0/redhat/rhel-5-i386/pgdg-centos-9.0-2.noarch.rpm
Mince01 # rpm -ihv pgdg-centos-9.0-2.noarch.rpm

23:17 Installing PostgreSQL 9.0.
Mince01 # yum install postgresql90
Mince01 # yum install postgresql90-server

23:25 Installed.
23:27 Restoring from back-up.
Mince01 # cp /var/lib/pgsql_old/backups/dump2011-07-11.bz2 /var/lib/pgsql/9.0/backups/
Mince01 # service postgresql-9.0 initdb
Mince01 # service postgresql-9.0 start

23:38 Changing configs.
Change /var/lib/pgsql/9.0/data/postgres.conf to listen on 192.168.0.12.
23:48 Edited /var/lib/pgsql/9.0/data/pg_hba.conf to allow access from 192.168.0.12 by indent.
Mince01 # su postgres
Mince01 $ cd ~/9.0/backups/
Mince01 $ cat dump2011-07-11.bz2 | bunzip2 | psql

23:51 Backup was successfully restored.
23:54 Allowed md5 access from 192.168.0.0/24 and connected with pgAdmin.
23:58 Creating tablespace.
Mince01 $ mkdir /var/server/postgres/ts000000
Mince01 $ psql
postgres=# create tablespace ts000000 location '/var/server/postgres/ts000000';

00:10 Granted permission to create tables in tablespace and created sample table.
postgres=# grant create on tablespace ts000000 to mince;

Last edited Jul 20, 2011 at 2:35 PM by Der_Meister, version 2

Comments

No comments yet.