Thread: pg_dump problem...

pg_dump problem...

From
"Andrew W. Schmeder"
Date:
Hi.

I am having a problem with the dump/restore operating for a 7.0.2 -> 7.1.2 migration.

This database won't let me do an export...

../bin/pg_dump xapnet_web
PQgetvalue: ERROR! tuple number 0 is out of range 0..-1
Segmentation fault

The nightly backup script for this database has been reporting this error for some time:

NOTICE:  Index pg_attribute_relid_attnum_index: NUMBER OF INDEX' TUPLES (725) IS NOT THE SAME AS
HEAP' (958).
    Recreate the index.
NOTICE:  Index pg_index_indexrelid_index: NUMBER OF INDEX' TUPLES (86) IS NOT THE SAME AS HEAP'
(85).
    Recreate the index.

The database seems to behave normally during all interactions via sql.  The database is not large
(less than 1 megabyte).

Is there anything I can do...?  Maybe some other method for exporting the data?

later,
andy
--
             Andrew W. Schmeder
    andy@electronicmolecule.com



Re: pg_dump problem...

From
Alex Pilosov
Date:
On Mon, 11 Jun 2001, Andrew W. Schmeder wrote:
>
> NOTICE:  Index pg_attribute_relid_attnum_index: NUMBER OF INDEX' TUPLES (725) IS NOT THE SAME AS
> HEAP' (958).
>     Recreate the index.
> NOTICE:  Index pg_index_indexrelid_index: NUMBER OF INDEX' TUPLES (86) IS NOT THE SAME AS HEAP'
> (85).
>     Recreate the index.
Try doing 'reindex table pg_attribute' and 'reindex table pg_index' and
then running dump again.

-alex


Re: pg_dump problem...

From
Tom Lane
Date:
"Andrew W. Schmeder" <andy@e-molecule.com> writes:
> I am having a problem with the dump/restore operating for a 7.0.2 -> 7.1.2 migration.

> This database won't let me do an export...

> ../bin/pg_dump xapnet_web
> PQgetvalue: ERROR! tuple number 0 is out of range 0..-1

You've probably got an object whose owning user has been deleted,
or some similar loss of a link that pg_dump expects to be there.

I'd suggest trying it with the 7.1.2 pg_dump (which should talk to
7.0.*).  It'll still complain, but with any luck give you a more useful
error message.  (If not, file a bug report.)

Another attack is to run pg_dump with query logging turned on, and
see what the last query issued before the failure is.

            regards, tom lane