Re: BUG #10095: primary key corruption - Mailing list pgsql-bugs

From Matheus de Oliveira
Subject Re: BUG #10095: primary key corruption
Date
Msg-id CAJghg4KAg7MV98ATcSdA7C+CD5JM2bt2wm7u3L0-DKS2DKeFkw@mail.gmail.com
Whole thread Raw
In response to BUG #10095: primary key corruption  (lukecoldiron@hotmail.com)
Responses Re: BUG #10095: primary key corruption  (Luke Coldiron <lukecoldiron@hotmail.com>)
List pgsql-bugs
On Mon, Apr 21, 2014 at 5:08 PM, <lukecoldiron@hotmail.com> wrote:

> ERROR:  could not read block 0 in file "base/16407/41243": read only 0 of
> 8192 bytes
>
>
Is this server a slave? Or has it been at some point (and now promoted to
master)?


>  When I look on the filesystem the "base/16407/41243" file is zero bytes.
> When I lookup the object name that is currupt via select relname from
> pg_class where relfilenode =3D 41243; it is always a primary key and not
> always on the same table.
>
>
For now, you can fix the corrupted indexes by simple issuing REINDEX.
Although I strongly recommend you doing a dump of all your databases,
remove it all and execute initdb again, and then restore the dumps.


> The system was previously upgraded from pg 8.3.7 and these issues did not
> occur.
>

How have you managed the upgrade? Also, has been any hardware issue
recently? I also recommend you checking for disk and memory corruption.

Best regards,
--=20
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br n=C3=ADvel F!
www.dextra.com.br/postgres

pgsql-bugs by date:

Previous
From: Alex Shafer
Date:
Subject: Re: BUG #10087: Invalid Apt GPG key
Next
From: Luke Coldiron
Date:
Subject: Re: BUG #10095: primary key corruption