RE: PostgreSQL Timeline Issue After Switchover with Pacemaker

From: <di(dot)liu(at)japannext(dot)co(dot)jp>
To: "'Laurenz Albe'" <laurenz(dot)albe(at)cybertec(dot)at>, <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: RE: PostgreSQL Timeline Issue After Switchover with Pacemaker
Date: 2025-02-03 01:45:47
Message-ID: 09f101db75dd$5a4f4bd0$0eede370$@japannext.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks, Laurenz Albe.

I found an article that explains a similar situation to the one I faced.
https://www.alibabacloud.com/blog/how-to-avoid-timeline-errors-during-database-switchover-based-on-asynchronous-streaming-replication_597819

-----Original Message-----
From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Sent: Friday, January 31, 2025 3:37 PM
To: di(dot)liu(at)japannext(dot)co(dot)jp; pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL Timeline Issue After Switchover with Pacemaker

On Fri, 2025-01-31 at 09:09 +0900, di(dot)liu(at)japannext(dot)co(dot)jp wrote:
> Why, after a full backup restore, did the standby still look for the wrong timeline?
> Is there a file or setting that records the timeline information?

It is hard to say what exactly happened, since I don't know your exact setup, but very likely a standby server got promoted, started a new timeline 8 and archived the corresponding history file. But somehow the rest of the cluster didn't follow that promotion. Now upon every restore attempt, the history file gets fetched from the WAL archive and causes confusion.

Yours,
Laurenz Albe

--
_This correspondence (including any attachments) is for the intended
recipient(s) only. It may contain confidential or privileged information or
both. No confidentiality or privilege is waived or lost by any
mis-transmission. If you receive this correspondence by mistake, please
contact the sender immediately, delete this correspondence (and all
attachments) and destroy any hard copies. You must not use, disclose, copy,
distribute or rely on any part of this correspondence (including any
attachments) if you are not the intended
recipient(s).本メッセージに記載および添付されている情報(以下、総称して「本情報」といいます。)は、本来の受信者による使用のみを意図しています。誤送信等により本情報を取得された場合でも、本情報に係る秘密、または法律上の秘匿特権が失われるものではありません。本電子メールを受取られた方が、本来の受信者ではない場合には、本情報及びそのコピーすべてを削除・破棄し、本電子メールが誤って届いた旨を発信者宛てにご通知下さいますようお願いします。本情報の閲覧、発信または本情報に基づくいかなる行為も明確に禁止されていることをご了承ください。_

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Benoit Lobréau 2025-02-04 15:22:45 Re: Commit with wait event on advisory lock!
Previous Message Tom Lane 2025-02-02 15:19:05 Re: Parameter Settings - Instance-Database-Specific