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

2023-02-28 Thread James Coleman
On Mon, Feb 27, 2023 at 2:33 AM Heikki Linnakangas wrote: > > On 16/11/2022 07:17, kuroda.keis...@nttcom.co.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 p

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

2023-02-27 Thread kuroda . keisuke
hi Heikki, Thanks to mail, and thanks also for the commit(0a0500207a) to fix the document. I'm glad the problem was solved. Best Regards, Keisuke Kuroda NTT COMWARE 2023-02-27 16:33 に Heikki Linnakangas さんは書きました: On 16/11/2022 07:17, kuroda.keis...@nttcom.co.jp wrote: I fixed this last week i

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

2023-02-26 Thread Heikki Linnakangas
On 16/11/2022 07:17, kuroda.keis...@nttcom.co.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 th

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

2022-11-15 Thread kuroda . keisuke
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 i

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

2022-07-05 Thread Kyotaro Horiguchi
At Tue, 5 Jul 2022 14:46:13 -0400, James Coleman wrote in > On Tue, Jul 5, 2022 at 2:39 PM Robert Haas wrote: > > > > On Sat, Jun 4, 2022 at 8:59 AM James Coleman wrote: > > > A quick background refresher: after promoting a standby rewinding the > > > former primary requires that a checkpoint h

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

2022-07-05 Thread Robert Haas
On Tue, Jul 5, 2022 at 2:47 PM Tom Lane wrote: > Robert Haas writes: > > Is there anything intrinsic to the mechanism of operation of pg_rewind > > that requires a timeline change, or could we just rewind within the > > same timeline to an earlier LSN? In other words, maybe we could just > > remo

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

2022-07-05 Thread Tom Lane
Robert Haas writes: > Is there anything intrinsic to the mechanism of operation of pg_rewind > that requires a timeline change, or could we just rewind within the > same timeline to an earlier LSN? In other words, maybe we could just > remove this limitation of pg_rewind, and then perhaps it would

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

2022-07-05 Thread James Coleman
On Tue, Jul 5, 2022 at 2:39 PM Robert Haas wrote: > > On Sat, Jun 4, 2022 at 8:59 AM James Coleman wrote: > > A quick background refresher: after promoting a standby rewinding the > > former primary requires that a checkpoint have been completed on the > > new primary after promotion. This is cor

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

2022-07-05 Thread Robert Haas
On Sat, Jun 4, 2022 at 8:59 AM James Coleman wrote: > A quick background refresher: after promoting a standby rewinding the > former primary requires that a checkpoint have been completed on the > new primary after promotion. This is correctly documented. However > pg_rewind incorrectly reports to

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

2022-06-08 Thread Kyotaro Horiguchi
At Wed, 08 Jun 2022 18:15:09 +0900 (JST), Kyotaro Horiguchi wrote in > At Tue, 07 Jun 2022 16:05:47 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Tue, 07 Jun 2022 12:39:38 +0900 (JST), Kyotaro Horiguchi > > wrote in > > > One possible way to detect promotion reliably is to look into tim

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

2022-06-08 Thread Kyotaro Horiguchi
At Tue, 07 Jun 2022 16:05:47 +0900 (JST), Kyotaro Horiguchi wrote in > At Tue, 07 Jun 2022 12:39:38 +0900 (JST), Kyotaro Horiguchi > wrote in > > One possible way to detect promotion reliably is to look into timeline > > history files. It is written immediately at promotion even on > > standb

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

2022-06-07 Thread vignesh ravichandran
I think this is a good improvement and also like the option (on pg_rewind) to potentially send checkpoints to the source. Personal anecdote. I was using stolon and frequently failing over. For sometime the rewind was failing that it wasn't required. Only learnt that it's the checkpoint on th

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

2022-06-07 Thread Kyotaro Horiguchi
At Tue, 7 Jun 2022 16:16:09 +0900, Michael Paquier wrote in > On Tue, Jun 07, 2022 at 12:39:38PM +0900, Kyotaro Horiguchi wrote: > > At Mon, 6 Jun 2022 08:32:01 -0400, James Coleman wrote > > in > >> To confirm I'm following you correctly, you're envisioning a situation > >> like: > >> > >>

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

2022-06-07 Thread Michael Paquier
On Tue, Jun 07, 2022 at 12:39:38PM +0900, Kyotaro Horiguchi wrote: > At Mon, 6 Jun 2022 08:32:01 -0400, James Coleman wrote in >> To confirm I'm following you correctly, you're envisioning a situation like: >> >> - Primary A >> - Replica B replicating from primary >> - Replica C replicating from

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

2022-06-07 Thread Kyotaro Horiguchi
At Tue, 07 Jun 2022 12:39:38 +0900 (JST), Kyotaro Horiguchi wrote in > One possible way to detect promotion reliably is to look into timeline > history files. It is written immediately at promotion even on > standbys. The attached seems to work. It uses timeline history files to identify the so

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

2022-06-06 Thread Kyotaro Horiguchi
At Mon, 6 Jun 2022 08:32:01 -0400, James Coleman wrote in > On Mon, Jun 6, 2022 at 1:26 AM Kyotaro Horiguchi > wrote: > > > > At Sat, 4 Jun 2022 19:09:41 +0530, Bharath Rupireddy > > wrote in > > > On Sat, Jun 4, 2022 at 6:29 PM James Coleman wrote: > > > > > > > > A few weeks back I sent a b

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

2022-06-06 Thread James Coleman
On Mon, Jun 6, 2022 at 1:26 AM Kyotaro Horiguchi wrote: > > At Sat, 4 Jun 2022 19:09:41 +0530, Bharath Rupireddy > wrote in > > On Sat, Jun 4, 2022 at 6:29 PM James Coleman wrote: > > > > > > A few weeks back I sent a bug report [1] directly to the -bugs mailing > > > list, and I haven't seen a

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

2022-06-06 Thread James Coleman
On Sat, Jun 4, 2022 at 9:39 AM Bharath Rupireddy wrote: > > On Sat, Jun 4, 2022 at 6:29 PM James Coleman wrote: > > > > A few weeks back I sent a bug report [1] directly to the -bugs mailing > > list, and I haven't seen any activity on it (maybe this is because I > > emailed directly instead of u

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

2022-06-05 Thread Kyotaro Horiguchi
At Sat, 4 Jun 2022 19:09:41 +0530, Bharath Rupireddy wrote in > On Sat, Jun 4, 2022 at 6:29 PM James Coleman wrote: > > > > A few weeks back I sent a bug report [1] directly to the -bugs mailing > > list, and I haven't seen any activity on it (maybe this is because I > > emailed directly instea

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

2022-06-04 Thread Bharath Rupireddy
On Sat, Jun 4, 2022 at 6:29 PM James Coleman wrote: > > A few weeks back I sent a bug report [1] directly to the -bugs mailing > list, and I haven't seen any activity on it (maybe this is because I > emailed directly instead of using the form?), but I got some time to > take a look and concluded t

pg_rewind: warn when checkpoint hasn't happened after promotion

2022-06-04 Thread James Coleman
A few weeks back I sent a bug report [1] directly to the -bugs mailing list, and I haven't seen any activity on it (maybe this is because I emailed directly instead of using the form?), but I got some time to take a look and concluded that a first-level fix is pretty simple. A quick background ref