Re: pg_rewind: warn when checkpoint hasn't happened after promotion

From: James Coleman <jtc331(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: kuroda(dot)keisuke(at)nttcom(dot)co(dot)jp, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, robertmhaas(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_rewind: warn when checkpoint hasn't happened after promotion
Date: 2023-02-28 12:37:53
Message-ID: CAAaqYe9hvWwJ98zFvWjVxrz-DHW4XO=ggUq6YEnhOc4hBUse-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 27, 2023 at 2:33 AM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>
> On 16/11/2022 07:17, kuroda(dot)keisuke(at)nttcom(dot)co(dot)jp wrote:
> >> The issue here is pg_rewind looks into control file to determine the
> >> soruce timeline, because the control file is not updated until the
> >> first checkpoint ends after promotion finishes, even though file
> >> blocks are already diverged.
> >>
> >> Even in that case history file for the new timeline is already
> >> created, so searching for the latest history file works.
> >
> > I think this change is a good one because if I want
> > pg_rewind to run automatically after a promotion,
> > I don't have to wait for the checkpoint to complete.
> >
> > The attached patch is Horiguchi-san's patch with
> > additional tests. The tests are based on James's tests,
> > "010_no_checkpoint_after_promotion.pl" tests that
> > pg_rewind is successfully executed without running
> > checkpoint after promote.
>
> I fixed this last week in commit 009eeee746, see thread [1]. I'm sorry I
> didn't notice this thread earlier.
>
> I didn't realize that we had a notice about this in the docs. I'll go
> and remove that. Thanks!
>
> - Heikki
>

Thanks; I think the missing [1] (for reference) is:
https://www.postgresql.org/message-id/9f568c97-87fe-a716-bd39-65299b8a60f4%40iki.fi

James

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2023-02-28 13:20:17 Re: [PoC] Improve dead tuple storage for lazy vacuum
Previous Message Drouvot, Bertrand 2023-02-28 12:36:24 Re: Add shared buffer hits to pg_stat_io