Gentoo Archives: gentoo-user

From: Gregory Shearman <zekeyg@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory
Date: Mon, 05 Dec 2011 10:59:13
Message-Id: 20111205105659.GA16909@pacific.net.au
1 In linux.gentoo.user, you wrote:
2 > On 12/05/11 13:37, Gregory Shearman wrote:
3 >>In linux.gentoo.user, Joseph wrote:
4 >>> I'm upgrading form posgresql 9.0 to 9.1, it seem to the upgrade went OK but when try to transfer the data
5 >>> base:
6 >>> pg_upgrade91 -v --old-datadir=/var/lib/postgresql/9.0/data/ --new-datadir=/var/lib/postgresql/9.1/data
7 >>> --old-bindir=/usr/lib/postgresql-9.0/bin/ --new-bindir=/usr/lib/postgresql-9.1/bin/
8 >>> Running in verbose mode
9 >>> Performing Consistency Checks
10 >>> -----------------------------
11 >>> Checking current, bin, and data directories
12 >>> You must have read and write access in the current directory.
13 >>> Failure, exiting
14 >>>
15 >>> What am I doing wrong?
16 >>
17 >>Have you checked that you have read and write access in the current
18 >>directory before running the command?
19 >>
20 >>I did the upgrade as the "postgres" user and made sure that I ran the
21 >>command from a read/writable directory for that user.
22 >
23 > Yes, I did "su postgres"
24 > and ls -al /var/lib/postgresql/9.1/
25 > drwx------ 13 postgres postgres 4096 Dec 4 18:20 data
26 >
27 > so it should work.
28 >
29 > --
30 > Joseph
31
32 hmmm...
33
34 Which directory are you running the command from? I ran mine from
35 /var/lib/postgresql which has the properties:
36
37 drwxr-xr-x 4 postgres root
38
39 I don't recall using the command "pg_upgrade91", but I see that it is a
40 symlink to /usr/lib/postgresql-9.1/bin/pg_upgrade
41
42 This is the command that worked for me:
43
44 pg_upgrade -u postgres -d /var/lib/postgresql/9.0/data -D \\
45 /var/lib/postgresql/9.1/data -b /usr/lib/postgresql-9.0/bin -B \\
46 /usr/lib/postgresql-9.1/bin
47
48 For more information do (as postgres user)
49
50 $ pg_upgrade --help
51
52 --
53 Regards,
54 Gregory

Replies