You are not logged in.

#1 2012-09-30 19:43:46

slevin123
Member
Registered: 2012-05-18
Posts: 9

Problem with upgrading postgres to 9.2

Hello,

Today I wanted to start postgres and I realized that I have to upgrade it.. so I followed what its said on the wiki
https://wiki.archlinux.org/index.php/PostgreSQL

when I do

sudo -u postgres pg_upgrade \
   -b /opt/pgsql-9.1/bin/ \
   -B /usr/bin/ \
   -d /var/lib/postgres/data-9.1 \
   -D /var/lib/postgres/data

I get this error

cannot write to log file pg_upgrade_internal.log
Failure, exiting

but then if I do

su - postgres -c 'pg_upgrade -d /var/lib/postgres/data-9.1/ -D /var/lib/postgres/data/ -b /opt/pgsql-9.1/bin/ -B /usr/bin/'

I get an LC_COLLATE error that says that old and new values are differents

Is there something I can do?

Thanks in advance

Last edited by slevin123 (2012-09-30 19:44:20)

Offline

#2 2012-10-01 04:37:16

Archaiic
Member
Registered: 2011-08-01
Posts: 3

Re: Problem with upgrading postgres to 9.2

When you initialize the new database as the postgres user:
initdb --lc-collate <insert 9.1 collate here> -D /var/lib/postgres/data

Offline

#3 2012-10-02 07:16:04

deadshox
Member
From: Berlin, Germany
Registered: 2009-08-25
Posts: 31

Re: Problem with upgrading postgres to 9.2

Hi,

how can i get the collate from 9.1?

Offline

#4 2012-10-02 10:27:50

kiven
Member
Registered: 2012-10-02
Posts: 4

Re: Problem with upgrading postgres to 9.2

Hi,

As postgres user:

/opt/pgsql-9.1/bin/postmaster -D /var/lib/postgres/data_old/

with another terminal, as postgres user, open a pgsql console and then

show lc_collate

Offline

#5 2012-10-02 12:22:22

deadshox
Member
From: Berlin, Germany
Registered: 2009-08-25
Posts: 31

Re: Problem with upgrading postgres to 9.2

Thanks. smile

Offline

#6 2012-10-31 21:03:17

hagan
Member
Registered: 2012-10-31
Posts: 1

Re: Problem with upgrading postgres to 9.2

I had a similar error, changing to a directory that postgres has r/w in, let me run the upgrade command without the "cannot write to log file pg_upgrade_internal.log" error..

Offline

Board footer

Powered by FluxBB