Re: PANIC: corrupted item pointer

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Janning Vygen <vygen(at)kicktipp(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PANIC: corrupted item pointer
Date: 2012-03-29 19:39:38
Message-ID: 1333049978.12949.10.camel@sussancws0025
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

First of all, shut down both servers (you indicated that you have a
replica) and make a full copy of both data directories. At the first
sign of corruption, that's always a good step as long as it's a
practical amount of data (obviously this is more of a challenge if you
have terabytes of data).

On Tue, 2012-03-27 at 11:47 +0200, Janning Vygen wrote:
> Hi,
>
> I am running postgresql-9.1 from debian backport package
> fsync=on
> full_page_writes=off

That may be unsafe (and usually is) depending on your I/O system and
filesystem. However, because you didn't have any power failures, I don't
think this is the cause of the problem.

> I didn't had any power failures on this server.

These WARNINGs below could also be caused by a power failure. Can you
verify that no power failure occurred? E.g. check uptime, and maybe look
at a few logfiles?

> Now I got this:
>
> 1. Logfile PANIC
>
> postgres[27352]: [4-1] PANIC: corrupted item pointer: offset = 21248,
> size = 16

...

> Then I run "VACUUM rankingentry" and i got:
> kicktipp=# VACUUM rankingentry ;
> WARNING: relation "rankingentry" page 424147 is uninitialized --- fixing
> WARNING: relation "rankingentry" page 424154 is uninitialized --- fixing
> WARNING: relation "rankingentry" page 424155 is uninitialized --- fixing
> WARNING: relation "rankingentry" page 424166 is uninitialized --- fixing
> WARNING: relation "rankingentry" page 424167 is uninitialized --- fixing
> WARNING: relation "rankingentry" page 424180 is uninitialized --- fixing
> VACUUM
> Time: 138736.347 ms
>

...

> I am worried because i never had any error like this with postgresql. I
> just switched to 9.1 and started to have a hot standby server (WAL
> shipping). Does this error has any relation to this?

Did you get the PANIC and WARNINGs on the primary or the replica? It
might be worth doing some comparisons between the two systems.

Again, make those copies first, so you have some room to explore to find
out what happened.

It seems very unlikely that problems on the master would be caused by
the presence of a replication slave.

> Should I check or exchange my hardware? Is it a hardware problem?

It could be.

> Should I still worry about it?

Yes. The WARNINGs might be harmless if it were a power failure, but you
say you didn't have a power failure. The PANIC is pretty clearly
indicating corruption.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andy Colson 2012-03-29 19:49:25 Re: Move Tables From One Database to Another
Previous Message Gabriele Bartolini 2012-03-29 19:39:12 Re: Move Tables From One Database to Another