pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Sergey Konoplev <gray.ru@gmail.com>
To: Heikki Linnakangas <hlinnakangas@vmware.com>
To: matioli.matheus@gmail.com
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Cc: Maxim Boguk <maxim.boguk@gmail.com>
Cc: Максим Панченко <Panchenko@gw.tander.ru>
Cc: Сизов Сергей Павлович <sizov_sp@gw.tander.ru>
Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages
Date: Mon, 6 Jan 2014 14:48:15 +0100
Message-ID: <20140106134815.GE28320@alap2.anarazel.de> (raw)
In-Reply-To: <CAL_0b1s4QCkFy_55kk_8XWcJPs7wsgVWf8vn4=jXe6V4R7Hxmg@mail.gmail.com>
References: <CAL_0b1s4QCkFy_55kk_8XWcJPs7wsgVWf8vn4=jXe6V4R7Hxmg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Hi,

On 2013-12-19 14:37:04 -0800, Sergey Konoplev wrote:
> 2013-12-19 20:51:22 MSK 19938 @ from  [vxid:1/0 txid:0] [] WARNING:
> page 14833 of relation base/16436/3321003988 is uninitialized
> 2013-12-19 20:51:22 MSK 19938 @ from  [vxid:1/0 txid:0] [] CONTEXT:
> xlog redo vacuum: rel 1663/16436/3321003988; blk 38538,
> lastBlockVacuumed 0
> 2013-12-19 20:51:22 MSK 19938 @ from  [vxid:1/0 txid:0] [] PANIC:  WAL
> contains references to invalid pages
> 2013-12-19 20:51:22 MSK 19938 @ from  [vxid:1/0 txid:0] [] CONTEXT:
> xlog redo vacuum: rel 1663/16436/3321003988; blk 38538,
> lastBlockVacuumed 0
> 2013-12-19 20:51:22 MSK 19935 @ from  [vxid: txid:0] [] LOG:  startup
> process (PID 19938) was terminated by signal 6: Aborted
> 2013-12-19 20:51:22 MSK 19935 @ from  [vxid: txid:0] [] LOG:
> terminating any other active server processes

There just was another case of this reported on IRC by MatheusOl and for
some reason in his case I noticed the pertinent details and it quickly
clicked:
* page 14833 is the one with the error
* we're actually vacuuming page 38538
* lastBlockVacuumed is 0

In btree_xlog_vacuum() we scan all the pages between lastBlockVacuumed
and the page vacuumed and acquire a cleanup lock on it. But there isn't
any guarantee that the intermediate pages are valid, filled pages,
afaics. ISTM we can just use RBM_ZERO_ON_ERROR instead of RBM_NORMAL.

Alternatively we could devise a trivial routine that just does a
BufTableLookup() and the required hangups around that. But that seems
more invasive than necessary.

Neither makes me really happy, but I don't see a nicer solution right
now.

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, 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 (36+ messages)  latest in thread

Message-ID: <20140106134815.GE28320@alap2.anarazel.de>
Permalink:  ../20140106134815.GE28320@alap2.anarazel.de/
Also on:    postgresql.org/message-id/20140106134815.GE28320@alap2.anarazel.de

 · 

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: andres@2ndquadrant.com, gray.ru@gmail.com, hlinnakangas@vmware.com, matioli.matheus@gmail.com, maxim.boguk@gmail.com, Panchenko@gw.tander.ru, sizov_sp@gw.tander.ru
  Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages
  In-Reply-To: <20140106134815.GE28320@alap2.anarazel.de>
  References: <CAL_0b1s4QCkFy_55kk_8XWcJPs7wsgVWf8vn4=jXe6V4R7Hxmg@mail.gmail.com> <20140106134815.GE28320@alap2.anarazel.de>

* 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