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-05 07:59:29
Message-ID: CABUevEwjRUNQ-SNQyQ0FrCRAJD39u23s=46Qc=BDEGinNrJ+ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 5, 2019 at 9:56 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> On Fri, Apr 05, 2019 at 09:41:58AM +0200, Michael Banck wrote:
> > Is there a good reason why Postgres doesn't just issue a CHECKPOINT
> > after promote itself? After all, this seems to be about making the
> > control file having the proper content, which sounds like a good thing
> > to have in general.
>
> The startup process requests a checkpoint since 9.3, and before that
> it was doing the checkpoint by itself (grep for fast_promoted and
> RequestCheckpoint() around line 7579 in xlog.c). This allows the
> recovery to finish much faster.
>
> > Could this be a problem for anything else besides pg_rewind?
>
> Not that I know of, at least not in the tree.
>
> > This looks like a needless footgun waiting to happen, and just
> > documenting it in pg_rewind's notes section looks a bit too hidden to me
> > (but is certainly an improvement).
>
> We had a couple of reports on the matter over the past years. Perhaps
> we could use a big fat warning but that feels a bit overdoing it.
>

A related question is, could we (for 12+) actually make the problem go
away? As in, can we detect the state and just have pg_rewind issue the
checkpoint as needed?

--
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 Michael Paquier 2019-04-05 08:06:01 Re: pg_rewind vs superuser
Previous Message Michael Paquier 2019-04-05 07:56:32 Re: pg_rewind vs superuser