Re: PostgresDB - Advise on possible data corruption

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'Porwal, Utkarsh *EXTERN*'" <utkarsh(dot)porwal(at)emc(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PostgresDB - Advise on possible data corruption
Date: 2015-09-08 09:48:29
Message-ID: A737B7A37273E048B164557ADEF4A58B50FA219C@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Porwal, Utkarsh wrote:
>>> At a customer environment we found an issue where insertion to a
>>> particular table fails with errors like 
>>>
>>> ERROR: invalid page header in block 9757828 of relation
>>> base/2403282/2403731

>> On further investigation, it is found that the issue with inserts is with table A. However the error
>> of blocks point to a pg_toast table associated with Table A (this has been confirmed).
>>
>> Also, from the errors I see that a total of 70 blocks are complaining about errors and block size is
>> 8KB.
>>
>> Any advise to take it further? I was thinking of reindexing the toast table but it doesn't have a
>> index . Also I fail to understand why inserts will have a problem since it will write to a new
>> location.

> Anyone??

An INSERT in a database table is not an append to a file.

If your toast table is corrupted and you don't have a backup, your best bet is to
salvage all the data you can by selectively dumping as much of the table as possible.
Expect data loss.

Yours,
Laurenz Albe

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2015-09-08 12:56:05 Re: counting transactions
Previous Message Albe Laurenz 2015-09-08 09:42:08 Re: Advise on restoring from VM Snapshot backup