From: leif@lako.no
To: Jeff Janes <jeff.janes@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15589: Due to missing wal, restore ends prematurely and opens database for read/write
Date: Sat, 12 Jan 2019 05:59:54 +0000
Message-ID: <179d68685819a53bda2101bc999297d3@lako.no> (raw)
In-Reply-To: <CAMkU=1ym=UYLVS37NNSE547Uw0_xPJUuBmyZPqEHARd=Un6eiA@mail.gmail.com>
References: <CAMkU=1ym=UYLVS37NNSE547Uw0_xPJUuBmyZPqEHARd=Un6eiA@mail.gmail.com>
<15589-8e6e353a97b085fb@postgresql.org>
"Jeff Janes" <jeff.janes@gmail.com (mailto:jeff.janes@gmail.com?to=%22Jeff%20Janes%22%20<jeff.janes@gmail.com>)> skrev 11. januar 2019 kl. 15:03:
On Fri, Jan 11, 2019 at 4:08 AM PG Bug reporting form <noreply@postgresql.org (mailto:noreply@postgresql.org)> wrote:
PostgreSQL should have paused recovery also on the first scenario. Then I
could have added missing wal and continued with restore.
I agree with you that something here is not very user friendly. But the counter argument is that you should not be hiding WAL files from the system in the first place. Once it is told that the file doesn't exist, it doesn't make sense to pause because non-existence is usually permanent, so there is nothing to be done after a pause. Or in other words, the pause feature is to let you change your mind about what time point you want to recover to (moving it only forward), not to let you change your mind about what WAL files exist in the first place. So I don't think this is a bug, but perhaps there is room for improvement.
At the least, I think we should log an explicit WARNING if the WAL stream ends before the specified PIT is reached.
No one hides WAL files from the system deliberately. A few days of WAL files could take up a lot of space. And they could come from different backup sets.
If you have a gap in your restored WAL-files and have specified date and time further ahead, an warning and a pause should be issued.
Without the pause in recover the warning is of little use as the database is already opened for read and write.
--
Leif
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: leif@lako.no, jeff.janes@gmail.com
Subject: Re: BUG #15589: Due to missing wal, restore ends prematurely and opens database for read/write
In-Reply-To: <179d68685819a53bda2101bc999297d3@lako.no>
References: <CAMkU=1ym=UYLVS37NNSE547Uw0_xPJUuBmyZPqEHARd=Un6eiA@mail.gmail.com> <15589-8e6e353a97b085fb@postgresql.org> <179d68685819a53bda2101bc999297d3@lako.no>
* 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