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-08 07:15:33
Message-ID: 20100208071603.C4229632287@mail.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Just for the heck of it, I entered the database again and issued the:

select * from pg_index where indexrelid = 2196359751;

a fourth time. This time, the command returns this message:

indexrelid | indrelid | indkey | indclass | indnatts | indisunique | indisprimary | indisclustered | indexprs | indpred
------------+----------+--------+----------+----------+-------------+--------------+----------------+----------+---------
(0 rows)

------

At 02:07 AM 2/8/2010, peter(at)vfemail(dot)net wrote:

>The first execution of the:
>
> select * from pg_index where indexrelid = 2196359751;
>
>command returned this message:
>
> WARNING: terminating connection because of crash of another server process
> DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
> HINT: In a moment you should be able to reconnect to the database and repeat your command.
>server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> The connection to the server was lost. Attempting reset: Succeeded.
>
>A second execution of this command returns a syntax error complaining about the semicolon.
>
>A third execution of this command without the semicolon returns nothing.
>
>After executing these three commands, I exited Postgresql and ran the pg_dump script. The database backup process terminated with these 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;
>
>-------
>
>At 01:19 AM 2/8/2010, Tom Lane wrote:
>>peter(at)vfemail(dot)net writes:
>>> At 11:29 AM 2/7/2010, Tom Lane wrote:
>>>> Do you get anything from "select * from pg_class where oid = 2196359751;" ?
>>
>>> Yes. The:
>>> select * from pg_class where oid = 2196359751;
>>> command returns [ nothing ]
>>
>>OK, well that explains why it can't open such a relation ;-). The next
>>question is why is it trying to. My first guess is that there is a
>>dangling link in pg_index, ie you once had an index with such an OID
>>but something happened to it. Please try
>>
>> select * from pg_index where indexrelid = 2196359751;
>>
>>and if that gets a hit, then select the pg_class row with the OID
>>shown as indrelid.
>>
>> regards, tom lane
>
>
>
>--
>Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-novice

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message James Long 2010-02-08 07:57:45 Re: Novice PL/pgSQL question and example
Previous Message peter 2010-02-08 07:07:33 Re: Incomplete pg_dump operation