Re: Completely broken replica after PANIC: WAL contains references to invalid pages

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org, Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>, Максим Панченко <Panchenko(at)gw(dot)tander(dot)ru>, Толстенко Илья <tolstenko_iv(at)gw(dot)tander(dot)ru>
Subject: Re: Completely broken replica after PANIC: WAL contains references to invalid pages
Date: 2013-04-01 07:49:16
Message-ID: CA+U5nMKMSkcxr5HjrTzXtcMybK-0DAFQhOJ8G2KsvZMGtgULGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 30 March 2013 17:21, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:

> So if the xid is later than latestObservedXid we extend subtrans one by
> one. So far so good. But we initialize it in
> ProcArrayApplyRecoveryInfo() when consistency is initially reached:
> latestObservedXid = running->nextXid;
> TransactionIdRetreat(latestObservedXid);
> Before that subtrans has initially been started up with:
> if (wasShutdown)
> oldestActiveXID = PrescanPreparedTransactions(&xids, &nxids);
> else
> oldestActiveXID = checkPoint.oldestActiveXid;
> ...
> StartupSUBTRANS(oldestActiveXID);
>
> That means its only initialized up to checkPoint.oldestActiveXid. As it
> can take some time till we reach consistency it seems rather plausible
> that there now will be a gap in initilized pages. From
> checkPoint.oldestActiveXid to running->nextXid if there are pages
> inbetween.

That was an old bug.

StartupSUBTRANS() now explicitly fills that gap. Are you saying it
does that incorrectly? How?

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message jevgeni.virves 2013-04-01 16:57:29 BUG #8026: pgAdmin III FATAL: Cannot open the logfile!
Previous Message Tom Lane 2013-03-31 21:58:00 Re: BUG #8025: PostgreSQL crash (>= 9.1 64 bit)