pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedClarify base backups and local pg_wal recycling
3+ messages / 3 participants
[nested] [flat]
* Clarify base backups and local pg_wal recycling
@ 2026-09-29 15:33 Toppr Tenali <shreeharish271203@gmail.com>
2026-09-30 13:13 ` Re: Clarify base backups and local pg_wal recycling Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 3+ messages in thread
From: Toppr Tenali @ 2026-09-29 15:33 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org
Hello,
I would like to suggest a clarification to the PostgreSQL documentation regarding base backups and local WAL recycling.
The documentation explains separately that:
- archived WAL required by a base backup can eventually be deleted once that backup is safely archived
- WAL segments in pg_wal can be recycled or removed after they are no longer needed and, when archiving is enabled, have been successfully archived.
However, I could not find an explicit statement about whether taking or completing a base backup itself affects when WAL segments in the local pg_wal directory become eligible for recycling/removal.
Could the documentation explicitly clarify this relationship? This distinction is easy to miss when reading the base-backup and WAL-archiving sections together.
Thank you.
Best regards,
Tenali
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Clarify base backups and local pg_wal recycling
2026-09-29 15:33 Clarify base backups and local pg_wal recycling Toppr Tenali <shreeharish271203@gmail.com>
@ 2026-09-30 13:13 ` Laurenz Albe <laurenz.albe@cybertec.at>
2026-09-30 13:30 ` Re: Clarify base backups and local pg_wal recycling David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Laurenz Albe @ 2026-09-30 13:13 UTC (permalink / raw)
To: Toppr Tenali <shreeharish271203@gmail.com>; pgsql-docs@lists.postgresql.org
On Tue, 2026-09-29 at 21:03 +0530, Toppr Tenali wrote:
> I would like to suggest a clarification to the PostgreSQL documentation regarding base
> backups and local WAL recycling.
>
> The documentation explains separately that:
>
> - archived WAL required by a base backup can eventually be deleted once that backup
> is safely archived
I'd say that is wrong - you need to *retain* the WAL required to recover a backup,
otherwise you cannot restore it. Where in the documentation do you see that sentence?
> - WAL segments in pg_wal can be recycled or removed after they are no longer needed
> and, when archiving is enabled, have been successfully archived.
Right, but you forgot that replication slots will also keep PostgreSQL from
deleting WAL segments.
> However, I could not find an explicit statement about whether taking or completing a
> base backup itself affects when WAL segments in the local pg_wal directory become
> eligible for recycling/removal.
>
> Could the documentation explicitly clarify this relationship?
I don't think that there is a relationship between WAL recycling and a base backup,
so there is nothing to document.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Clarify base backups and local pg_wal recycling
2026-09-29 15:33 Clarify base backups and local pg_wal recycling Toppr Tenali <shreeharish271203@gmail.com>
2026-09-30 13:13 ` Re: Clarify base backups and local pg_wal recycling Laurenz Albe <laurenz.albe@cybertec.at>
@ 2026-09-30 13:30 ` David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: David G. Johnston @ 2026-09-30 13:30 UTC (permalink / raw)
To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: Toppr Tenali <shreeharish271203@gmail.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
On Wednesday, September 30, 2026, Laurenz Albe <laurenz.albe@cybertec.at>
wrote:
> On Tue, 2026-09-29 at 21:03 +0530, Toppr Tenali wrote:
>
> > However, I could not find an explicit statement about whether taking or
> completing a
> > base backup itself affects when WAL segments in the local pg_wal
> directory become
> > eligible for recycling/removal.
> >
> > Could the documentation explicitly clarify this relationship?
>
> I don't think that there is a relationship between WAL recycling and a
> base backup,
> so there is nothing to document.
>
In fact, the wording of -X fetch mode shows the non-linkage quite well.
Likewise -X stream also explains how pg_basebackup provides a behavior to
deal with the noninherent coordination between the two systems.
David J.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-09-30 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 15:33 Clarify base backups and local pg_wal recycling Toppr Tenali <shreeharish271203@gmail.com>
2026-09-30 13:13 ` Laurenz Albe <laurenz.albe@cybertec.at>
2026-09-30 13:30 ` David G. Johnston <david.g.johnston@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox