I've followed those instruction, but it seems to me they are not complete:
Code: Select all
mkdir /var/lib/postgresql/9.1/
mkdir /var/lib/postgresql/9.1/data
chown postgres:postgres /var/lib/postgresql/9.1/data/
ln -s /etc/postgresql-9.0/*.conf /var/lib/postgresql/9.0/data/
ln -s /etc/postgresql-9.1/*.conf /var/lib/postgresql/9.1/data/
su - postgres
postgres@syscon2 ~ $ pg_upgrade -u postgres \
> -d /var/lib/postgresql/9.0/data -D /var/lib/postgresql/9.1/data \
> -b /usr/lib/postgresql-9.0/bin/ -B /usr/lib/postgresql-9.1/bin
Performing Consistency Checks
-----------------------------
Checking old data directory (/var/lib/postgresql/9.0/data) ok
Checking old bin directory (/usr/lib/postgresql-9.0/bin) ok
Checking new data directory (/var/lib/postgresql/9.1/data) ok
Checking new bin directory (/usr/lib/postgresql-9.1/bin) ok
This utility can only upgrade to PostgreSQL version 9.0.
The last statement: This utility can only upgrade to PostgreSQL version 9.0.
I'm upgrading from 9.0 to 9.1, is it significant?
The data databases did not get transfered. I have tired to transfer the data but I get an error:
You must have read and write access in the current directory.
Code: Select all
pg_upgrade91 -v --old-datadir=/var/lib/postgresql/9.0/data/ --new-datadir=/var/lib/postgresql/9.1/data --old-bindir=/usr/lib/postgresql-9.0/bin/ --new-bindir=/usr/lib/postgresql-9.1/bin/
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories
You must have read and write access in the current directory.
data - directory is owned by "postgres" so why it is complaining about not able to read/write?
Code: Select all
ls -al /var/lib/postgresql/9.1/
total 12
drwx------ 13 postgres postgres 4096 Dec 4 18:20 data