Re: pg_rewind vs superuser

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Michael Banck <mbanck(at)gmx(dot)net>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_rewind vs superuser
Date: 2019-04-11 08:33:13
Message-ID: CABUevEwX0jHnVx5D1Y+AVF2dWB9EVcWshJxv1q9WwFhyMGmbwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 8, 2019 at 8:17 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> On Sun, Apr 07, 2019 at 03:06:56PM +0200, Magnus Hagander wrote:
> > So can we *detect* that this is the case? Because if so, we could perhaps
> > just wait for it to be done? Because there will always be one?
>
> Yes, this one is technically possible. We could add a timeout option
> which checks each N seconds the control file of the online source and
> sees if its timeline differs or not with the target, waiting for the
> change to happen. If we do that, we may want to revisit the behavior
> of not issuing an error if the source and the target are detected as
> being on the same timeline, and consider it as a failure.
>

I think doing something like that would be a good idea.

I mean, we should *always* detect if if we can, since it's a condition
where things don't work properly.

And I think it would make sense to wait by default, but we could then also
have a commandline parameter that says "don't wait, instead error out in
case the checkpoint isn't done".

Or something like that?

> The main point is -- we know from experience that it's pretty fragile to
> > assume the user read the documentation :) So if we can find *any* way to
> > handle this in code rather than docs, that'd be great. We would still
> > absolutely want the docs change for back branches of course.
>
> Any veeeeery recent experience on the matter perhaps? :)
>

Actually no, I've been considering it for some time due to the number of
questions we get on it that get exactly the same answer. And then you doing
the docs patch reminded me of it :)

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2019-04-11 08:46:09 Re: Zedstore - compressed in-core columnar storage
Previous Message Heikki Linnakangas 2019-04-11 08:14:11 Re: Failure in contrib test _int on loach