Re: Problems dumping a DB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jscott(at)webmail(dot)bmi(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems dumping a DB
Date: 2000-11-09 04:09:27
Message-ID: 5227.973742967@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

jscott(at)webmail(dot)bmi(dot)net writes:
> I'm trying to dump a database from a 6.5 PGSQL server so that I can put it
> on a new server that is running the latest version. The problem is that
> when I try to dump it gives me this error:

> [jesse(at)titan jesse]$ pg_dump rat > rat.db
> dumpSequence(reporters_idnum_seq): 0 (!= 1) tuples returned by SELECT
> [jesse(at)titan jesse]$

> I'm not sure what's going on with that that sequence. It seems to be
> working properly (I just inserted another row into that table and it
> assigned it the next number in the sequence.) but I can't drop the
> sequence:

> rat=> drop sequence reporters_idnum_seq;
> ERROR: DeletePgTypeTuple: reporters_idnum_seq type nonexistent

Wow, that's pretty bizarre. I'm not too concerned about trying to
work out how 6.5 could get into a state like that --- but if you can
reproduce it on a newer release, let us know ;-)

Meanwhile, your best bet is to try to drop the sequence so pg_dump
won't spit up. Evidently you are missing the tuple data type that
normally goes with a relation (including sequence relations).
Fortunately, delete isn't real picky about *what* type it drops,
it just wants to find one with the right name. So try

create type reporters_idnum_seq(input = int4in, output = int4out);

and then see if you can drop the sequence.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matt Beauregard 2000-11-09 04:57:27 Re: Relation 'pg_user' does not exist
Previous Message Stephan Szabo 2000-11-09 03:49:09 Re: Text concat Problem