pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dan Langille <dan@langille.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Cc: bain@tcsn.co.za
Subject: Re: sanity error with pg_dump on postgresql 7.0.2
Date: Tue, 07 Jan 2003 10:38:20 -0500
Message-ID: <3E1AAE1C.31852.5CD78E0@localhost> (raw)
In-Reply-To: <13326.1041953356@sss.pgh.pa.us>
References: <3E1A9F4C.10041.5939DDA@localhost>

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

> "Dan Langille" <dan@langille.org> 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/




view thread (4+ messages)  latest in thread

Message-ID: <3E1AAE1C.31852.5CD78E0@localhost>
Permalink:  ../3E1AAE1C.31852.5CD78E0@localhost/
Also on:    postgresql.org/message-id/3E1AAE1C.31852.5CD78E0@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: dan@langille.org, tgl@sss.pgh.pa.us, bain@tcsn.co.za
  Subject: Re: sanity error with pg_dump on postgresql 7.0.2
  In-Reply-To: <3E1AAE1C.31852.5CD78E0@localhost>
  References: <3E1A9F4C.10041.5939DDA@localhost> <3E1AAE1C.31852.5CD78E0@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox