From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_upgrade fails for non-postgres user |
Date: | 2011-01-29 04:07:00 |
Message-ID: | 201101290407.p0T470w02760@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Magnus Hagander wrote:
> I just tried doing pg_upgrade on a database when logged in as user
> "mha" rather than "postgres" on my system. And it failed. Even though
> the db was initialized with superuser "mha". The reason for this was
> that pg_upgrade tried to connect to the database "mha" (hardcoded to
> be the db username), and that certainly didn't exist.
>
> When that was fixed, I realized the psql command to create the
> datanbases connect to database "template1" only to immediately switch
> to database "postgres", which also seems rather pointless.
>
> Attach patch makes it connect to the "postgres" database instead of
> $USER, and then also changes the psql command to actually use it.
>
> I know way too little about pg_upgrade to tell if this is fully safe,
> but it does fix the problem in my installation.
I will run tests and report back -- thanks.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Dan Ports | 2011-01-29 04:36:40 | Re: SSI patch version 14 |
Previous Message | Stephen Frost | 2011-01-29 04:06:09 | Re: Add support for logging the current role |