Re: [HACKERS] pg_dump not dumping all tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] pg_dump not dumping all tables
Date: 1999-07-29 00:07:34
Message-ID: 25812.933206854@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"G. Anthony Reina" <reina(at)nsi(dot)edu> writes:
> I think I may have found the error but I can't be sure. I compressed the
> pg_dump'd backup file and then samba'd it to a Windows 95 machine in order to
> burn it to a CD-ROM. I wonder if Windows added extra line feeds here and
> there (although I don't see them when I do a head or tail on the
> file).

If the file was compressed when you transferred it, then any newline
breakage would have messed it up pretty thoroughly... so I doubt that
theory.

Hannu's thought is a good one: corrupted data within a particular COPY
command would probably have caused the entire COPY to fail, but psql
would have recovered at the \. and picked up with the rest of the
restore script, which seems to match the symptoms. I think he's blamed
a long-gone bug, but there could be another one with similar effects.

However, if that happened you should certainly have seen a complaint
from psql (and also in the postmaster log) while running the restore.
Did you look through the output of the restore script carefully?

> All of the tables seemed to be the ones marked ***_proc (e.g.
> center_out_proc, ellipse_proc, etc.). These all seemed to be at the end of
> the pg_dump.

Hmm. What kind of data was in them?

> Yes. They get created just after the copy commands. Of course, it would be
> nice if they were created first and then the data was copied in.

There's a reason for that: it's a lot faster to build the index after
doing the bulk load, rather than incrementally as the data is loaded.

> Again, the text file is over 2 Gig so I can't seem to find an editor that is
> big enough to hold it all in memory (I only have a half a gig of RAM). So it
> really is just guesswork. Anything you can think of to strip the data from
> this big of a file?

Not short of writing a little perl script that looks for COPY ... and \.
But at this point it seems likely that the problem is in the data
itself, so stripping it out would lose the evidence anyway. Grumble.

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-07-29 00:21:51 Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect)
Previous Message Tom Lane 1999-07-28 23:44:21 Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect)