Re: Questions about the continuity of WAL archiving

From: px shi <spxlyy123(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Questions about the continuity of WAL archiving
Date: 2025-08-08 05:50:19
Message-ID: CAAccyYLYZmwQiNMoJcQgo5t+E24rDtu1ZeBUrER7ZTKNAcZesw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you for your reply.
The archived files can be used for PITR (Point-In-Time Recovery), allowing
recovery to any point between WAL 80 and 100 on timeline 1.
Additionally, if there's a backup taken during timeline 1 and a switchover
to a new primary has occurred without taking a new full backup yet, these
WAL logs can still be used to recover to any point on timeline 2.

Regards,
Pixian Shi

Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> 于2025年8月8日周五 12:25写道:

> On 8/7/25 20:20, px shi wrote:
> > Hi,
> > There is a scenario: the current timeline of the PostgreSQL primary node
> > is 1, and the latest WAL file is 100. The standby node has also received
> > up to WAL file 100. However, the latest WAL file archived is only file
> > 80. If the primary node crashes at this point and the standby is
> > promoted to the new primary, archiving will resume from file 100 on
> > timeline 2. As a result, WAL files from 81 to 100 on timeline 1 will be
> > missing from the archive.
>
> What are you planning to do with the archived files?
>
> Also is not the case that once the primary crashes you are in a split
> brain case and can't really trust it's timeline anymore?
>
>
> > Is there a good solution to prevent this situation?
> >
> > Regards,
> > Pixian Shi
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dominique Devienne 2025-08-08 08:18:28 Re: CALL and named parameters
Previous Message Adrian Klaver 2025-08-08 04:25:30 Re: Questions about the continuity of WAL archiving