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.

Reply via email to