Re: 9.4 checksum errors in recovery with gin index

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 9.4 checksum errors in recovery with gin index
Date: 2014-05-07 20:40:19
Message-ID: 536A9A33.7080001@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05/07/2014 10:35 AM, Jeff Janes wrote:
> When recovering from a crash (with injection of a partial page write at
> time of crash) against 7c7b1f4ae5ea3b1b113682d4d I get a checksum
> verification failure.
>
> 16396 is a gin index.
>
> If I have it ignore checksum failures, there is no apparent misbehavior.
> I'm trying to bisect it, but it could take a while and I thought someone
> might have some theories based on the log:
>
> 29075 2014-05-06 23:29:51.411 PDT:LOG: 00000: database system was not
> properly shut down; automatic recovery in progress
> 29075 2014-05-06 23:29:51.411 PDT:LOCATION: StartupXLOG, xlog.c:6361
> 29075 2014-05-06 23:29:51.412 PDT:LOG: 00000: redo starts at 11/323FE1C0
> 29075 2014-05-06 23:29:51.412 PDT:LOCATION: StartupXLOG, xlog.c:6600
> 29075 2014-05-06 23:29:51.471 PDT:WARNING: 01000: page verification
> failed, calculated checksum 35967 but expected 7881
> 29075 2014-05-06 23:29:51.471 PDT:CONTEXT: xlog redo Delete list pages

A-ha. The WAL record of list page deletion doesn't create a full-page
images of the deleted pages. That's pretty sensible, as a deleted page
doesn't contain any data that needs to be retained. However, if a
full-page image is not taken, then the page should be completely
recreated from scratch at replay. It's not doing that.

Thanks for the testing! I'll have a stab at fixing that tomorrow.
Basically, ginRedoDeleteListPages() needs to re-initialize the deleted
pages.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-05-07 20:47:54 Re: jsonb existence queries are misimplemented by jsonb_ops
Previous Message Tom Lane 2014-05-07 20:39:12 jsonb existence queries are misimplemented by jsonb_ops