public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Gregory Shearman <zekeyg@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] pg_upgrade91 - You must have read and write access  in the current  directory
Date: Mon, 5 Dec 2011 21:56:59 +1100	[thread overview]
Message-ID: <20111205105659.GA16909@pacific.net.au> (raw)
In-Reply-To: <i4xpD-34S-7@gated-at.bofh.it>

In linux.gentoo.user, you wrote:
> On 12/05/11 13:37, Gregory Shearman wrote:
>>In linux.gentoo.user, Joseph wrote:
>>> I'm upgrading form posgresql 9.0 to 9.1, it seem to the upgrade went OK but when try to transfer the data
>>> base:
>>> 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.
>>> Failure, exiting
>>>
>>> What am I doing wrong?
>>
>>Have you checked that you have read and write access in the current
>>directory before running the command?
>>
>>I did the upgrade as the "postgres" user and made sure that I ran the
>>command from a read/writable directory for that user.
>
> Yes, I did "su postgres"
> and ls -al /var/lib/postgresql/9.1/
> drwx------ 13 postgres postgres 4096 Dec  4 18:20 data
>
> so it should work.
>
> -- 
> Joseph

hmmm...

Which directory are you running the command from? I ran mine from
/var/lib/postgresql which has the properties:

drwxr-xr-x 4 postgres root

I don't recall using the command "pg_upgrade91", but I see that it is a
symlink to /usr/lib/postgresql-9.1/bin/pg_upgrade

This is the command that worked for me:

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

For more information do (as postgres user)

$ pg_upgrade --help

-- 
Regards,
Gregory



       reply	other threads:[~2011-12-05 10:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <i4wMV-1QN-5@gated-at.bofh.it>
     [not found] ` <i4wMV-1QN-3@gated-at.bofh.it>
     [not found]   ` <i4xpD-34S-7@gated-at.bofh.it>
2011-12-05 10:56     ` Gregory Shearman [this message]
2011-12-05 17:59       ` [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory Joseph
     [not found] <i4EAO-6Xu-5@gated-at.bofh.it>
     [not found] ` <i4EAO-6Xu-7@gated-at.bofh.it>
     [not found]   ` <i4EAO-6Xu-9@gated-at.bofh.it>
     [not found]     ` <i4EAO-6Xu-3@gated-at.bofh.it>
     [not found]       ` <i4L9i-1nZ-67@gated-at.bofh.it>
2011-12-05 22:24         ` Gregory Shearman
     [not found] <i4w0x-w6-7@gated-at.bofh.it>
2011-12-05  2:37 ` Gregory Shearman
2011-12-05  3:25   ` Joseph
2011-12-05  1:52 Joseph

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111205105659.GA16909@pacific.net.au \
    --to=zekeyg@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox