pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Michael Robinson <michael@snupps.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Re: BUG #13739: Recurring corrupted page pointer panics on hot-standby replica
Date: Thu, 29 Oct 2015 09:57:14 -0300
Message-ID: <20151029125714.GB5726@alvherre.pgsql> (raw)
In-Reply-To: <CAA7ibAkLsQfeH2WB+N3nvd38J6tufXX-W4QD0yZDJHbo9J+8ow@mail.gmail.com>
References: <CAA7ibAkLsQfeH2WB+N3nvd38J6tufXX-W4QD0yZDJHbo9J+8ow@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Michael Robinson wrote:
> I am somewhat surprised that BUG #13668 merits a response, and this one
> does not.

Clearly, that one was much easier to answer than yours.

> Not a bug?
> Won't fix?
> Insufficient information?
> Go away stop bothering us?
> Something else?
> Anything?

Most likely, it's either a bug in a WAL record or its replay code, or the
platform has failed to keep its promises (flipped bits, etc)

> On Tue, Oct 27, 2015 at 09:22:08AM +0000, michael(at)snupps(dot)com wrote:

> > 2015-10-24 14:16:46.489 UTC PANIC:  corrupted page pointers: lower = 17,
> > upper = 0, special = 8176
> > 2015-10-24 14:16:46.490 UTC CONTEXT:  xlog redo unlink_page: rel
> > 1663/16416/254063; dead 11796080; left 1365037; right 3024097; btpo_xact
> > 64542957; leaf 2456241; leafleft 11130443; leafright 1350594; topparent
> > 4294967295

The code expects "upper" to be higher than "lower", per this check in
PageAddItem:

	/*
	 * Be wary about corrupted page pointers
	 */
	if (phdr->pd_lower < SizeOfPageHeaderData ||
		phdr->pd_lower > phdr->pd_upper ||
		phdr->pd_upper > phdr->pd_special ||
		phdr->pd_special > BLCKSZ)
		ereport(PANIC,
				(errcode(ERRCODE_DATA_CORRUPTED),
				 errmsg("corrupted page pointers: lower = %u, upper = %u, special = %u",
						phdr->pd_lower, phdr->pd_upper, phdr->pd_special)));

It's likely that some previous operation set the pd_upper value to 0 --
maybe replay of an earlier WAL record.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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



view thread (3+ messages)

Message-ID: <20151029125714.GB5726@alvherre.pgsql>
Permalink:  ../20151029125714.GB5726@alvherre.pgsql/
Also on:    postgresql.org/message-id/20151029125714.GB5726@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@2ndquadrant.com, michael@snupps.com
  Subject: Re: BUG #13739: Recurring corrupted page pointer panics on hot-standby replica
  In-Reply-To: <20151029125714.GB5726@alvherre.pgsql>
  References: <CAA7ibAkLsQfeH2WB+N3nvd38J6tufXX-W4QD0yZDJHbo9J+8ow@mail.gmail.com> <20151029125714.GB5726@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox