Re: pg_rewind: warn when checkpoint hasn't happened after promotion - Mailing list pgsql-hackers

From kuroda.keisuke@nttcom.co.jp
Subject Re: pg_rewind: warn when checkpoint hasn't happened after promotion
Date
Msg-id ab39f6cbd775a4ead9fb3ea7fcf3edd1@nttcom.co.jp
Whole thread Raw
In response to Re: pg_rewind: warn when checkpoint hasn't happened after promotion  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: pg_rewind: warn when checkpoint hasn't happened after promotion
List pgsql-hackers
Hi, hackers

> 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.

Best Regards,
Keisuke Kuroda
NTT COMWARE
Attachment

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum
Next
From: Andres Freund
Date:
Subject: Re: New strategies for freezing, advancing relfrozenxid early