public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: px shi <[email protected]>
To: Justin <[email protected]>
Cc: Ron Johnson <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Questions about the continuity of WAL archiving
Date: Wed, 13 Aug 2025 08:09:27 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAccyYKz4GH6FcEMKkk3CLmkqKm230ozwMs67UyTkZ4FGRbnZA@mail.gmail.com>
References: <CAAccyYKpNsQMD+S-A7a8YtDevFN0uRXkzg4tYWWBOFsv_jASNg@mail.gmail.com>
<[email protected]>
<CAAccyYLYZmwQiNMoJcQgo5t+E24rDtu1ZeBUrER7ZTKNAcZesw@mail.gmail.com>
<[email protected]>
<CAAccyYJ-07SzCRAEkGJ2Qa8EAPCHQM4qcpB=OvD8P0zDbCJ0KQ@mail.gmail.com>
<[email protected]>
<CAAccyYLdp7AkqS9or3cc+=HSBo3bWMojR20KkzWSC5BenEn=VQ@mail.gmail.com>
<CANzqJaD-pOt=0CBFXUPEXMtD8AMi_y76z4=Rak405+Rhui4hKQ@mail.gmail.com>
<CAAccyY+tnPFNuc33c6L0wdExSAEU0VGg4hSn=kuo7gNvroiRRA@mail.gmail.com>
<CALL-XePTK6SRnpzq_9kj9YA29BU6oFkHuM5WitQx7ySP4QVyzw@mail.gmail.com>
<CAAccyYKz4GH6FcEMKkk3CLmkqKm230ozwMs67UyTkZ4FGRbnZA@mail.gmail.com>
On 8/12/25 22:48, px shi wrote:
> Here’s a scenario: The latest WAL file on the primary node is
> 0000000100000000000000AF, and the standby node has also received up to
> 0000000100000000000000AF. However, the latest WAL file that has been
> successfully archived from the primary is only 0000000100000000000000A1
> (WAL files from A2 to AE have not yet been archived). If the primary
> crashes at this point, triggering a failover, the new primary will start
> generating and archiving WAL on a new timeline (2), beginning with
> 0000000200000000000000AF. It will not backfill the missing WAL files
> from timeline 1 (0000000100000000000000A2 to 0000000100000000000000AE).
> As a result, while the new primary does not have any local WAL gaps, the
> archive directory will contain a gap in that WAL range.
> I’m not sure if I explained it clearly.
Why does it matter?
1) Your standby is starting off up to date.
2) You can do a pg_basebackup from the new primary as a base for the
restart of the old primary. Assuming you have archiving set up on the
new primary then the restarted primary can catch up.
3) If you don't want to do 2) then you need an archive location that can
deal with the velocity of the WAL archiving.
>
>
> Justin <[email protected] <mailto:[email protected]>> 于2025年8月
> 13日周三 10:51写道:
>
--
Adrian Klaver
[email protected]
view thread (12+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Questions about the continuity of WAL archiving
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox