From: Michael Paquier <michael@paquier.xyz>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: leif@lako.no
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: BUG #15589: Due to missing wal, restore ends prematurely and opens database for read/write
Date: Tue, 26 Feb 2019 17:12:55 +0900
Message-ID: <20190226081255.GK27822@paquier.xyz> (raw)
In-Reply-To: <20190131.212648.235621599.horiguchi.kyotaro@lab.ntt.co.jp>
References: <CAMkU=1ym=UYLVS37NNSE547Uw0_xPJUuBmyZPqEHARd=Un6eiA@mail.gmail.com>
<15589-8e6e353a97b085fb@postgresql.org>
<a3bf3b8910cd5adb8a5fbc8113eac0ab@lako.no>
<20190131.212648.235621599.horiguchi.kyotaro@lab.ntt.co.jp>
On Thu, Jan 31, 2019 at 09:26:48PM +0900, Kyotaro HORIGUCHI wrote:
> I don't think no one expected that server follows
> recovery_target_action without setting a target, so we can change
> the behavior when any kind of target is specified. So I propose
> to follow recovery_target_action even if not rached the target
> when any recovery target isspecified.
Quoting the docs:
https://www.postgresql.org/docs/current/recovery-target-settings.html
recovery_target_action (enum)
"Specifies what action the server should take once the recovery target
is *reached*."
So what we have now is that an action would be taken iff a stop point
is defined and reached. What this patch changes is that the action
would be taken even if the stop point has *not* been reached once the
end of a WAL stream is found.
+ * to be taken regardless whether the target is reached or not .
Nit 1: Dot at the end has an extra space.
Nit 2: s/specfied/specified/
Please do not take me wrong, I can see that there could be use cases
where it is possible to take an action at the end of a WAL stream if
there is less WAL than what was planned, perhaps if the OP has set
an incorrect stop position too far in the future, still too much WAL
would have been replayed so it would make the base backup unusable for
future uses. Also, it looks incorrect to me to change an existing
behavior and to use the same semantics for triggering an action if a
stop point is defined and reached.
--
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 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: michael@paquier.xyz, horiguchi.kyotaro@lab.ntt.co.jp, leif@lako.no, pgsql-hackers@lists.postgresql.org
Subject: Re: BUG #15589: Due to missing wal, restore ends prematurely and opens database for read/write
In-Reply-To: <20190226081255.GK27822@paquier.xyz>
References: <CAMkU=1ym=UYLVS37NNSE547Uw0_xPJUuBmyZPqEHARd=Un6eiA@mail.gmail.com> <15589-8e6e353a97b085fb@postgresql.org> <a3bf3b8910cd5adb8a5fbc8113eac0ab@lako.no> <20190131.212648.235621599.horiguchi.kyotaro@lab.ntt.co.jp> <20190226081255.GK27822@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