Re: pg_rewind vs superuser - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: pg_rewind vs superuser
Date
Msg-id CABUevEwX0jHnVx5D1Y+AVF2dWB9EVcWshJxv1q9WwFhyMGmbwQ@mail.gmail.com
Whole thread Raw
In response to Re: pg_rewind vs superuser  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pg_rewind vs superuser
List pgsql-hackers


On Mon, Apr 8, 2019 at 8:17 AM Michael Paquier <michael@paquier.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 :) 

--

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Failure in contrib test _int on loach
Next
From: Konstantin Knizhnik
Date:
Subject: Re: Zedstore - compressed in-core columnar storage