ERROR: could not read block 4 ...

Started by Leonardo M. Raméover 9 years ago3 messagesgeneral
Jump to latest
#1Leonardo M. Ramé
l.rame@griensu.com

Hi, I'm getting this error:

2016-09-15 09:35:24 ART [13984-1] ERROR: could not read block 4 in file
"base/12210/11965": Error de entrada/salida
2016-09-15 09:35:39 ART [14082-1] ERROR: could not read block 4 in file
"base/12210/11965": Error de entrada/salida
2016-09-15 09:35:54 ART [14170-1] ERROR: could not read block 4 in file
"base/12210/11965": Error de entrada/salida
2016-09-15 09:36:09 ART [20704-1] ERROR: could not read block 4 in file
"base/12210/11965": Error de entrada/salida

To find out which database points to it I use:

mydb=# select oid, datname from pg_database;
oid | datname
-------+-----------
1 | template1
12210 | template0 <--- Looks like this is the problematic db
12215 | postgres
16384 | mydb

Two questions:

1) Is this caused by a bad block?, can fsck fix it?.
2) Is there a way to re-generate template0?.

Regards,
--
Leonardo M. Ram�
Medical IT - Griensu S.A.
Av. Col�n 636 - Piso 8 Of. A
X5000EPT -- C�rdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Leonardo M. Ramé (#1)
Re: ERROR: could not read block 4 ...

"=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=" <l.rame@griensu.com> writes:

Hi, I'm getting this error:
2016-09-15 09:35:24 ART [13984-1] ERROR: could not read block 4 in file
"base/12210/11965": Error de entrada/salida

That looks like a hardware problem ... might want to budget for a new disk
sometime soon, before failures become more prevalent.

1) Is this caused by a bad block?, can fsck fix it?.

yes, and fsck is unlikely to help, though you could try.

2) Is there a way to re-generate template0?.

If you've never modified template1, you could drop template0 and re-create
it from template1. Otherwise, pg_dumpall/initdb/reload would seem to be
called for. A cautious person might want to do the latter anyway in case
there's more problems than just this one.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Leonardo M. Ramé
l.rame@griensu.com
In reply to: Tom Lane (#2)
Re: ERROR: could not read block 4 ...

El 15/09/16 a las 11:05, Tom Lane escribi�:

"=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=" <l.rame@griensu.com> writes:

Hi, I'm getting this error:
2016-09-15 09:35:24 ART [13984-1] ERROR: could not read block 4 in file
"base/12210/11965": Error de entrada/salida

That looks like a hardware problem ... might want to budget for a new disk
sometime soon, before failures become more prevalent.

1) Is this caused by a bad block?, can fsck fix it?.

yes, and fsck is unlikely to help, though you could try.

2) Is there a way to re-generate template0?.

If you've never modified template1, you could drop template0 and re-create
it from template1. Otherwise, pg_dumpall/initdb/reload would seem to be
called for. A cautious person might want to do the latter anyway in case
there's more problems than just this one.

regards, tom lane

Thanks, indeed, I'm moving the Db to another server.

--
Leonardo M. Ram�
Medical IT - Griensu S.A.
Av. Col�n 636 - Piso 8 Of. A
X5000EPT -- C�rdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general