Re: Incomplete pg_dump operation

From: peter(at)vfemail(dot)net
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Incomplete pg_dump operation
Date: 2010-02-07 11:36:02
Message-ID: 20100207113642.4EE9763269B@mail.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Thinking more about corruption of some type inside my database and whether an index has become corrupted, I investigated the REINDEX command described at pp. 288 and 847-849 of the 1335-page PostgreSQL 7.4.2 Documentation manual at <http://www.postgresql.org/files/documentation/pdf/7.4/postgresql-7.4.2-US.pdf>http://www.postgresql.org/files/documentation/pdf/7.4/postgresql-7.4.2-US.pdf

This morning, I executed a:

REINDEX DATABASE database_name FORCE;

command, and received a bunch of:

NOTICE: table "pg_xxxxx" was reindexed

messages -- which all look just fine.

I then executed a:

REINDEX TABLE xyz;

command -- using the table name pg_dump was complaining about yesterday -- and received this message:

ERROR: could not open relation with OID 2196359751

making reference to the same OID pg_dump complained about yesterday.

How do I identify this offensive data record that's causing so much disruption and, perhaps, delete it?

-------

At 10:08 AM 2/6/2010, peter(at)vfemail(dot)net wrote:

>A shell script runs pg_dump once each day to backup a Postgresql database and then compress it for storage. The script and backup process worked flawlessly for years, but now returns these error messages:
>
> pg_dump: ERROR: could not open relation with OID 2196359751
> pg_dump: SQL command to dump the contents of table "xyz" failed: PQendcopy() failed.
> pg_dump: Error message from server: ERROR: could not open relation with OID 2196359751
> pg_dump: The command was: COPY public.xyz ({various_field_names}) TO stdout;
>
>The pg_dump command halts with these error messages after copying or dumping about 50% of the database. Accordingly, only a fraction of the database is actually being backed up.
>
>Is there corruption of some type inside my PostgreSQL database? Has an index or something similar become corrupted?

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message peter 2010-02-07 13:50:11 Re: Incomplete pg_dump operation
Previous Message peter 2010-02-06 15:08:50 Incomplete pg_dump operation