Re: Phantom user in db--'128'

From: "Taber, Mark" <Mark(dot)Taber(at)dof(dot)ca(dot)gov>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Phantom user in db--'128'
Date: 2004-11-19 16:53:40
Message-ID: 7660B79A29B9D411999F00D0B78EC890727009@ntrk2.dof.finance
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks! Worked like a charm.

Mark Taber
State of California
Department of Finance
Infrastructure & Architecture

916.323.3104 x 2945
mark(dot)taber(at)dof(dot)ca(dot)gov

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Friday, November 19, 2004 7:42 AM
To: Taber, Mark
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Phantom user in db--'128'

"Taber, Mark" <Mark(dot)Taber(at)dof(dot)ca(dot)gov> writes:
> While using pg_dump and pg_restore (or attempting to restore, more
> precisely), the process failed because of a missing user, user '128'.
> I never created such a user, and when going to Privileges, such a user
> does not exist in the list. However, while going out and checking some
> of the tables, this user shows up as a user with privileges on them
> (however, not on all tables). How do I get rid of this user? And how
> do I ensure that it doesn't get created again? I'd like to understand
> what is really going on

You had a user with usesysid 128, whom you dropped, but he still had
privileges on some tables --- DROP USER is not good about detecting dangling
references.

I'd suggest recreating the user (CREATE USER foo WITH SYSID 128) and then
being careful to REVOKE all his privileges before you drop him again. Or
you can just manually edit the dump file to remove the attempts to GRANT him
privileges.

regards, tom lane

Browse pgsql-general by date

  From Date Subject
Next Message Pierre-Frédéric Caillaud 2004-11-19 18:46:55 Re: Can COPY skip a header line?
Previous Message Matteo Beccati 2004-11-19 16:36:32 Re: Can COPY skip a header line?