Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AD553477329 for ; Tue, 7 Jan 2003 12:48:42 -0500 (EST) Received: from web14604.mail.yahoo.com (web14604.mail.yahoo.com [216.136.224.84]) by postgresql.org (Postfix) with SMTP id 7C17D4772F8 for ; Tue, 7 Jan 2003 12:47:56 -0500 (EST) Message-ID: <20030107174802.75559.qmail@web14604.mail.yahoo.com> Received: from [63.207.14.101] by web14604.mail.yahoo.com via HTTP; Tue, 07 Jan 2003 09:48:02 PST Date: Tue, 7 Jan 2003 09:48:02 -0800 (PST) From: helen liu Subject: Re: sanity error with pg_dump on postgresql 7.0.2 To: Dan Langille , Tom Lane Cc: pgsql-admin@postgresql.org, bain@tcsn.co.za In-Reply-To: <3E1AAE1C.31852.5CD78E0@localhost> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-625408814-1041961682=:73344" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/56 X-Sequence-Number: 6898 --0-625408814-1041961682=:73344 Content-Type: text/plain; charset=us-ascii Hello, I am just wondering why Postgresql allow to drop a user without checking if he has any created tables/objects with him? Is it going to be optimized in the future release? Regards. Helen L. Dan Langille wrote:On 7 Jan 2003 at 10:29, Tom Lane wrote: > "Dan Langille" writes: > > I am forwarding this on behalf of bain@tcsn.co.za who is at a client > > site and cannot email. > > > I did a search and found a mail stating that its possibly related to > > a deleted user having ownership of the table. > > "http://www.geocrawler.com/mail/msg.php3?msg_id=5653159&list=10" I > > checked and indeed the owner that created the table no longer > > exists. Unfortunately I have no idea who that user was. > > You don't need to know. Get the old owner's sysid with > SELECT relowner FROM pg_class WHERE relname = 'busted_table'; > then create a user with the appropriate sysid: > CREATE USER foo WITH SYSID nnn; I think that's pretty much what he did: 1.) psql dbname 2.) select * from pg_table; this lists all th detaild of the tables in the DB. some might have owner set to "unknown (sysid=xx)" this is the problem. (note the sysid number) 3.) createuser -i xx (sysid user of the unknown table owner) 4.) pg_dump / pg_dumpall > Once you've done that, consider upgrading to a more recent Postgres. > It's been a good long while since pg_dump would choke on this > situation. FWIW, I think upgrade is the reason for the pg_dump. -- Dan Langille : http://www.langille.org/ ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-625408814-1041961682=:73344 Content-Type: text/html; charset=us-ascii

Hello,

I am just wondering why Postgresql allow to drop a user without checking if he has any created tables/objects with him? Is it going to be optimized in the future release?

Regards.

Helen L.

 Dan Langille <dan@langille.org> wrote:

On 7 Jan 2003 at 10:29, Tom Lane wrote:

> "Dan Langille" writes:
> > I am forwarding this on behalf of bain@tcsn.co.za who is at a client
> > site and cannot email.
>
> > I did a search and found a mail stating that its possibly related to
> > a deleted user having ownership of the table.
> > "http://www.geocrawler.com/mail/msg.php3?msg_id=5653159&list=10" I
> > checked and indeed the owner that created the table no longer
> > exists. Unfortunately I have no idea who that user was.
>
> You don't need to know. Get the old owner's sysid with
> SELECT relowner FROM pg_class WHERE relname = 'busted_table';
> then create a user with the appropriate sysid:
> CREATE USER foo WITH SYSID nnn;

I think that's pretty much what he did:

1.) psql dbname
2.) select * from pg_table;

this lists all th detaild of the tables in the DB.
some might have owner set to "unknown (sysid=xx)"
this is the problem. (note the sysid number)

3.) createuser -i xx (sysid user of the unknown table owner)
4.) pg_dump / pg_dumpall

> Once you've done that, consider upgrading to a more recent Postgres.
> It's been a good long while since pg_dump would choke on this
> situation.

FWIW, I think upgrade is the reason for the pg_dump.

--
Dan Langille : http://www.langille.org/


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-625408814-1041961682=:73344--