ERROR: could not read block 3 in file "base/12511/12270"

From: Paul Jones <pbj(at)cmicdo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: ERROR: could not read block 3 in file "base/12511/12270"
Date: 2015-12-24 00:17:19
Message-ID: 20151224001719.GA5051@cmicdo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have been having disk errors that have corrupted something in
my postgres database. Other databases work ok:

Running on Ubuntu 10.04.

paul(at)kitanglad:~$ psql -U postgres
psql (9.4.5)
Type "help" for help.

postgres=# SELECT pg_catalog.pg_is_in_recovery();
ERROR: could not read block 3 in file "base/12511/12270": read only 4096 of 8192 bytes
postgres=# \c pjtest
You are now connected to database "pjtest" as user "postgres".
pjtest=# SELECT pg_catalog.pg_is_in_recovery();
pg_is_in_recovery
-------------------
f
(1 row)

Since this is the "postgres" database, dropping and re-creating it
doesn't seem possible. pg_dump also gets the same error when I run
it on "postgres" so pg_basebackup will probably get the same error.

The only thing I can think of is to create a completely new data directory
with initdb and pg_dump/restore all the databases in the cluter to the
new data directory.

Is this my only option?

PJ

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2015-12-24 00:45:39 Re: ERROR: could not read block 3 in file "base/12511/12270"
Previous Message Tom Lane 2015-12-23 22:27:02 Re: Transfer db from one port to another