Re: BUG #10432: failed to re-find parent key in index

From: Greg Stark <stark(at)mit(dot)edu>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #10432: failed to re-find parent key in index
Date: 2014-06-03 00:36:40
Message-ID: CAM-w4HM3XEuAOSKeGLhBa0tV5Zwdv7Sx4Uo849a2-ivJZG8szA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jun 2, 2014 at 6:40 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>
> Did you check whether all the necessary FPIs were generated? That'd be
> my very first suspect.

Really? Shouldn't only the last one matter? All the other ones will be
overwritten later by later full page writes anywys, no? Also, i
thought this was pretty much underlying infrastructure that would be
pretty hard to get wrong in just one call site.

I see a relatively few inserts that don't have backup blocks. The few
that do are preceded by another insert for the same block since the
last checkpoint redo pointer location. There is precisely one split
and it's shortly after the backup started but is a split to a
different right block from the one in the error.

> How many checkpoints are inbetween 334/90 and 339/65?

68 (though 13 of those are basically empty as the system was idle for a while)

> I guess you could make xlogdump dump the data from the backup blocks...

That's a clever idea. But it proved to be a little less useful than I
expected. Because it's a btree, not a heap I can't actually decipher
the items using bt_page_items() on plain byteas.

I am looking at the page headers and I'm a bit surprised to find the
LSN on the backup block images doesn't match the LSN of the record the
backup blocks are found in. I guess that makes sense since some AMs
will be generating records prior to even having touched the page in
question? Other than that there's not much to see in the page headers
:(

--
greg

Attachment Content-Type Size
xlogdump.175193and193740 application/octet-stream 97.1 KB
bkpb-headers.sql application/sql 5.8 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Haribabu Kommi 2014-06-03 02:43:28 Re: BUG #9652: inet types don't support min/max
Previous Message Nicolas Ross 2014-06-02 19:39:58 Re: BUG #10500: Cannot restore from a dump when some function is used in public shcema