* Re: [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory [not found] <i4w0x-w6-7@gated-at.bofh.it> @ 2011-12-05 2:37 ` Gregory Shearman 2011-12-05 3:25 ` Joseph 0 siblings, 1 reply; 6+ messages in thread From: Gregory Shearman @ 2011-12-05 2:37 UTC (permalink / raw To: gentoo-user 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. -- Regards, Gregory. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory 2011-12-05 2:37 ` [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory Gregory Shearman @ 2011-12-05 3:25 ` Joseph 0 siblings, 0 replies; 6+ messages in thread From: Joseph @ 2011-12-05 3:25 UTC (permalink / raw To: gentoo-user 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. > >-- >Regards, >Gregory. 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <i4EAO-6Xu-5@gated-at.bofh.it>]
[parent not found: <i4EAO-6Xu-7@gated-at.bofh.it>]
[parent not found: <i4EAO-6Xu-9@gated-at.bofh.it>]
[parent not found: <i4EAO-6Xu-3@gated-at.bofh.it>]
[parent not found: <i4L9i-1nZ-67@gated-at.bofh.it>]
* Re: [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory [not found] ` <i4L9i-1nZ-67@gated-at.bofh.it> @ 2011-12-05 22:24 ` Gregory Shearman 0 siblings, 0 replies; 6+ messages in thread From: Gregory Shearman @ 2011-12-05 22:24 UTC (permalink / raw To: gentoo-user In linux.gentoo.user, you wrote: > On 12/05/11 21:56, Gregory Shearman wrote: >>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 >> > I definitely wasn't in that directory I just "su postgres" and run the command. > > I just recreate the databases by hand and populated them with backup data. I see. That's a shame. Usually, the HOME directory of the postgres user is set to /var/lib/postgresql. If you just do "su postgres" you'll remain in the directory from which you ran the command. What you *must* do is run: $ su - postgres Notice the '-'? This makes the su to the user a *login*, so that you'll be in the HOME directory of the postgres user. Try it yourself. Do an 'ls' after "su postgres" and then do an 'ls' after "su - postgres" See "man su" for more information. -- Regards, Gregory. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <i4wMV-1QN-5@gated-at.bofh.it>]
[parent not found: <i4wMV-1QN-3@gated-at.bofh.it>]
[parent not found: <i4xpD-34S-7@gated-at.bofh.it>]
* Re: [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory [not found] ` <i4xpD-34S-7@gated-at.bofh.it> @ 2011-12-05 10:56 ` Gregory Shearman 2011-12-05 17:59 ` Joseph 0 siblings, 1 reply; 6+ messages in thread From: Gregory Shearman @ 2011-12-05 10:56 UTC (permalink / raw To: gentoo-user 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory 2011-12-05 10:56 ` Gregory Shearman @ 2011-12-05 17:59 ` Joseph 0 siblings, 0 replies; 6+ messages in thread From: Joseph @ 2011-12-05 17:59 UTC (permalink / raw To: gentoo-user On 12/05/11 21:56, Gregory Shearman wrote: >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 > I definitely wasn't in that directory I just "su postgres" and run the command. I just recreate the databases by hand and populated them with backup data. -- Joseph ^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory @ 2011-12-05 1:52 Joseph 0 siblings, 0 replies; 6+ messages in thread From: Joseph @ 2011-12-05 1:52 UTC (permalink / raw To: gentoo-user 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? Is it a bug? http://postgresql.1045698.n5.nabble.com/Problem-with-pg-upgrade-s-directory-write-check-on-Windows-td4626004.html -- Joseph ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-12-05 22:26 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <i4w0x-w6-7@gated-at.bofh.it> 2011-12-05 2:37 ` [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory Gregory Shearman 2011-12-05 3:25 ` 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] <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 2011-12-05 17:59 ` Joseph 2011-12-05 1:52 Joseph
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox