From: Michael Paquier <michael@paquier.xyz>
To: Alexander Kukushkin <cyberdemn@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15346: Replica fails to start after the crash
Date: Thu, 30 Aug 2018 11:57:05 -0700
Message-ID: <20180830185705.GF15446@paquier.xyz> (raw)
In-Reply-To: <CAFh8B==uFj619A8dY1evowLxj_J=9mO29ONw_QHqSLsRQM5ZWw@mail.gmail.com>
References: <20180829061723.GA5903@paquier.xyz>
<CAFh8B=kuFyBsth-1wuPqncnTiCa7reKzCz=RzO1X-Y78U74F5g@mail.gmail.com>
<20180829121051.GC5903@paquier.xyz>
<CAFh8B==_6cY1f7rF4oxK+wjpWKaYzs96Q6Tn5=4QRWJiVnjmDg@mail.gmail.com>
<20180829205436.GE5903@paquier.xyz>
<CAFh8B=n-NSo2Ktz_DG3W4FAFr2xHYr7FyRNdOF6g7T2o1-CD4w@mail.gmail.com>
<20180830133911.GA15446@paquier.xyz>
<CAFh8B==_Acxr_-K0iRfWdVoAn_pfgzpvu+5AsdaWTEkttwhnnw@mail.gmail.com>
<20180830173435.GB15446@paquier.xyz>
<CAFh8B==uFj619A8dY1evowLxj_J=9mO29ONw_QHqSLsRQM5ZWw@mail.gmail.com>
On Thu, Aug 30, 2018 at 08:31:36PM +0200, Alexander Kukushkin wrote:
> 2018-08-30 19:34 GMT+02:00 Michael Paquier <michael@paquier.xyz>:
>> I have been struggling for a couple of hours to get a deterministic test
>> case out of my pocket, and I did not get one as you would need to get
>> the bgwriter to flush a page before crash recovery finishes, we could do
>
> In my case the active standby server has crashed, it wasn't in the
> crash recovery mode.
That's what I meant, a standby crashed and then restarted, doing crash
recovery before moving on with archive recovery once it was done with
all its local WAL.
> Minimum recovery ending location is AB3/4A1B3118, but at the same time
> I managed to find pages from 0000000500000AB300000053 on disk (at
> least in the index files). That could only mean that bgwriter was
> flushing dirty pages, but pg_control wasn't properly updated and it
> happened not during recovery after hardware crash, but while the
> postgres was running before the hardware crash.
Exactly, that would explain the incorrect reference.
> The only possible way to recover such standby - cut off all possible
> connections and let it replay all WAL files it managed to write to
> disk before the first crash.
Yeah... I am going to apply the patch after another lookup, that will
fix the problem moving forward. Thanks for checking by the way.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, cyberdemn@gmail.com, pgsql-hackers@postgresql.org, alvherre@2ndquadrant.com, 9erthalion6@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15346: Replica fails to start after the crash
In-Reply-To: <20180830185705.GF15446@paquier.xyz>
* 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