From: Tom Lane <tgl@sss.pgh.pa.us>
To: chris+postgresql@qwirx.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13459: Replaying WAL logs can hang on startup
Date: Mon, 22 Jun 2015 18:25:03 -0400
Message-ID: <6574.1435011903@sss.pgh.pa.us> (raw)
In-Reply-To: <20150622084201.3874.74819@wrigleys.postgresql.org>
References: <20150622084201.3874.74819@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
chris+postgresql@qwirx.com writes:
> I restored a standby from a pg_basebackup made from the master the previous
> morning. As a result, it had a lot of WAL logs to catch up on.
> At one point it hangs while restoring logs. It normally takes a few seconds
> to process a 16 MB WAL segment, but on this one, it was "recovering
> 0000000100000CEC00000025" for 7 minutes now with no log output at all.
Hmm ...
> My guess is that ForwardFsyncRequest() is continually returning false, and
> this code is stuck forever. I noticed that it says that "I'm inclined to
> assume that the checkpointer
> will always empty the queue soon", but there is no checkpointer running
> during recovery, is there?
There is supposed to be one once we have reached a consistent state; see
SetForwardFsyncRequests(). AFAICS it should be impossible to reach the
wait you're seeing unless the startup process's local pendingOpsTable has
been removed by SetForwardFsyncRequests(), and the caller of that should
have pinged the postmaster to start up a checkpointer.
If you can repro this easily, please look to see whether there's a
checkpointer, and if not, what state the postmaster is in (pmState,
CheckpointerPID, Shutdown, FatalError, RecoveryError might be
interesting). If there is a checkpointer, then that's what to be
looking at.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: tgl@sss.pgh.pa.us, chris+postgresql@qwirx.com
Subject: Re: BUG #13459: Replaying WAL logs can hang on startup
In-Reply-To: <6574.1435011903@sss.pgh.pa.us>
References: <20150622084201.3874.74819@wrigleys.postgresql.org> <6574.1435011903@sss.pgh.pa.us>
* 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