Re: [HACKERS] pg_upgrade fails for non-postgres user

2011-02-01 Thread Bruce Momjian
Magnus Hagander wrote: > On Tue, Feb 1, 2011 at 02:25, Bruce Momjian wrote: > > 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"

Re: [HACKERS] pg_upgrade fails for non-postgres user

2011-02-01 Thread Magnus Hagander
On Tue, Feb 1, 2011 at 02:25, Bruce Momjian wrote: > 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

Re: [HACKERS] pg_upgrade fails for non-postgres user

2011-01-31 Thread Bruce Momjian
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" (hardco

Re: [HACKERS] pg_upgrade fails for non-postgres user

2011-01-29 Thread Tom Lane
Bernd Helmle writes: > --On 28. Januar 2011 14:49:21 -0800 Josh Berkus wrote: >> The database "postgres" is >> reasonably likely to be dropped, whereas template1 doesn't get touched >> usually. > This is true for a bunch of installations i know. Maybe it's worth to make > it a command line swit

Re: [HACKERS] pg_upgrade fails for non-postgres user

2011-01-29 Thread Bernd Helmle
--On 28. Januar 2011 14:49:21 -0800 Josh Berkus wrote: The database "postgres" is reasonably likely to be dropped, whereas template1 doesn't get touched usually. This is true for a bunch of installations i know. Maybe it's worth to make it a command line switch to override the default beha

Re: [HACKERS] pg_upgrade fails for non-postgres user

2011-01-28 Thread Bruce Momjian
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" (hardco

Re: [HACKERS] pg_upgrade fails for non-postgres user

2011-01-28 Thread Josh Berkus
> 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 chan

[HACKERS] pg_upgrade fails for non-postgres user

2011-01-28 Thread Magnus Hagander
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