Re: wal segment size

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Andrew <adhenry(dot)9(at)gmail(dot)com>
Cc: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, Colin 't Hart <colinthart(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: wal segment size
Date: 2025-12-19 13:09:54
Message-ID: cdea7a44c8c696d762118d40295fded2f6493010.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Colin 't Hart 2025-12-19 13:25:58 Re: wal segment size
Previous Message Andrus 2025-12-19 12:41:37 How to get single table data from backup