Re: wal segment size

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Andrew <adhenry.9@gmail.com>
Cc: Greg Sabino Mullane <htamfids@gmail.com>, Colin 't Hart <colinthart@gmail.com>, PostgreSQL General <pgsql-general@lists.postgresql.org>
Date: 2025-12-19T13:09:54Z
Lists: pgsql-general
On Fri, 2025-12-19 at 09:26 +0100, Andrew wrote:
> As an oracle dba new to Postgres, I’m used to the concept of context switches and latch issues
> with regards to transaction log switches. Does Postgres have a similar mechanism with latching
> etc when it switches to a new wal segment that is alleviated when increasing the size of the
> wal segments?

Not really.  PostgreSQL doesn't reuse WAL segments in a circular fashion like Oracle does.
At the end of a checkpoint, it creates new, empty WAL segments for future use, so if there
is a need to switch to a new segment, there is no need to wait for anything.

Yours,
Laurenz Albe