Thread: ERROR on database index

ERROR on database index

From
Frank Alberto Rodriguez
Date:
Hello. 
This morning the logs are showing me this error when I make a connection with 
an specific database.

[
ERROR:  index "pg_proc_proname_args_nsp_index" contains unexpected zero page 
at block 16 at character 61 
]

I create a new database but I don't know where to find the origin of the 
problem, or how to avoid this. Any idea would be helpful.

Thanks 






Re: ERROR on database index

From
Laurenz Albe
Date:
Frank Alberto Rodriguez wrote:
> This morning the logs are showing me this error when I make a connection with 
> an specific database.
> 
> [
> ERROR:  index "pg_proc_proname_args_nsp_index" contains unexpected zero page 
> at block 16 at character 61 
> ]
> 
> I create a new database but I don't know where to find the origin of the 
> problem, or how to avoid this. Any idea would be helpful.

Ths looks like data corruption.

Could be a hardware problem or a PostgreSQL bug.

Were there any crashes lately?

Since this is an index, running
  REINDEX TABLE pg_proc;
as superuser would fix the problem.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




Re: ERROR on database index

From
Frank Alberto Rodriguez Solana
Date:
Hi Laurenz, thanks for you reply. I do REINDEX but then the same problem was trigger but with pg_description_o_c_o_index,

[XX002] org.postgresql.util.PSQLException: ERROR: index "pg_description_o_c_o_index" contains unexpected zero page at block

I reindex pg_description and I don't see more problems. The system file type is ext4 and is a cloud server.

But seeing logs I saw other problem in the same server but other database:
ERROR:  invalid page in block 1478644 of relation pg_tblspc/117936/PG_10_201707211/117939/259612

that's makes me wonder if the problem is in the filesystem, but I have 3 cloud servers with the same specification and working charge, and each server have an incremental backup with barman.

Thanks

El jue., 28 mar. 2019 a las 7:01, Laurenz Albe (<laurenz.albe@cybertec.at>) escribió:
Frank Alberto Rodriguez wrote:
> This morning the logs are showing me this error when I make a connection with
> an specific database.
>
> [
> ERROR:  index "pg_proc_proname_args_nsp_index" contains unexpected zero page
> at block 16 at character 61
> ]
>
> I create a new database but I don't know where to find the origin of the
> problem, or how to avoid this. Any idea would be helpful.

Ths looks like data corruption.

Could be a hardware problem or a PostgreSQL bug.

Were there any crashes lately?

Since this is an index, running
  REINDEX TABLE pg_proc;
as superuser would fix the problem.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

Re: ERROR on database index

From
Laurenz Albe
Date:
Frank Alberto Rodriguez Solana wrote:

> Hi Laurenz, thanks for you reply. I do REINDEX but then the same problem was trigger but with
pg_description_o_c_o_index,
 
> 
> [XX002] org.postgresql.util.PSQLException: ERROR: index "pg_description_o_c_o_index" contains unexpected zero page at
block
> 
> I reindex pg_description and I don't see more problems. The system file type is ext4 and is a cloud server.
> 
> But seeing logs I saw other problem in the same server but other database:
> ERROR:  invalid page in block 1478644 of relation pg_tblspc/117936/PG_10_201707211/117939/259612
> 
> that's makes me wonder if the problem is in the filesystem, but I have 3 cloud servers with the same
> specification and working charge, and each server have an incremental backup with barman.

At this point I would restore a backup, pg_dumpall and restore to a new server.

Data corruption can spread.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com