From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #11090: Unclear error message in pg_upgrade |
Date: | 2014-07-29 21:59:37 |
Message-ID: | CAMkU=1ykdaBSL+Y3rm8NaQ+cONnbsAEdujZvrHtCRFjson2f7g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Jul 29, 2014 at 2:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > Jeff Janes wrote:
> >> I have one database with a retrospectively poor choice of initdb -U. I
> >> certainly wish there was a way, short of dump and restore, to change the
> >> name of that user. Although I don't think pg_upgrade would be the ideal
> >> way to do that.
>
> > Have you tried an UPDATE pg_authid?
>
No. Updating the system catalog directly sounds like one of those 'you get
to keep both pieces' situations, and it wasn't that important to me.
>
> Or even just ALTER USER RENAME?
>
I thought I tried that. On a test system, I see that it works once I
create yet another superuser to be logged in as as I do the renaming. I
think the problem I was having before I gave up is that the desired new
role already existed and owned some inconsequential objects. I tried to
REASSIGN OWNED the rest of the objects to it, which wouldn't work. What I
should have done is REASSIGNED OWNED the few stray objects from the desired
role back to the -U role (or to a completely different role), drop the
desired one, and then rename the -U user to the desired one.
So yeah, I think there is a path to do this, it is just quite convoluted.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2014-07-30 02:08:19 | Re: BUG #11090: Unclear error message in pg_upgrade |
Previous Message | Tom Lane | 2014-07-29 21:31:47 | Re: BUG #11090: Unclear error message in pg_upgrade |