Re: BUG #10095: primary key corruption

From: Matheus de Oliveira <matioli(dot)matheus(at)gmail(dot)com>
To: lukecoldiron(at)hotmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #10095: primary key corruption
Date: 2014-04-22 13:46:52
Message-ID: CAJghg4KAg7MV98ATcSdA7C+CD5JM2bt2wm7u3L0-DKS2DKeFkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Apr 21, 2014 at 5:08 PM, <lukecoldiron(at)hotmail(dot)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 = 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,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Luke Coldiron 2014-04-22 15:28:39 Re: BUG #10095: primary key corruption
Previous Message Sáreník Ján 2014-04-22 10:33:03 Re: BUG #9818: LDAP Authentication subtree problem