public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrew <[email protected]>
To: Laurenz Albe <[email protected]>
Cc: Greg Sabino Mullane <[email protected]>
Cc: Colin 't Hart <[email protected]>
Cc: PostgreSQL General <[email protected]>
Subject: Re: wal segment size
Date: Fri, 19 Dec 2025 09:26:17 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
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?
Regards
Andrew
Sent from my iPhone
> On 17 Dec 2025, at 18:58, Laurenz Albe <[email protected]> wrote:
>
> On Wed, 2025-12-17 at 12:21 -0500, Greg Sabino Mullane wrote:
>>> On Wed, Dec 17, 2025 at 11:10 AM Colin 't Hart <[email protected]> wrote:
>>> Thanks Laurenz, that confirms what I was assuming. Archiving is via pgbackrest
>>> to a backup server, over SSH. Approx 750ms to archive each segment is crazy --
>>> I'll check compression parameters too.
>>
>> Switch to archive-async = on. When doing that, the typical time drops to 10ms or less.
>> Also use a compress-type of lz4 or zst, which perform way better than the default gz.
>> If you are encrypting, that's a bottleneck you just have to deal with, no shortcuts there. :)
>
> I second that. Asynchronous archiving in pgBackRest tends to work around the problem.
>
>> tl;dr try other things before messing with the WAL size. The current size can work very
>> well even on very large and very, very busy systems.
>
> On the other hand, 16MB on a very busy system is somewhat ridiculous.
> A somewhat bigger segment size may be appropriate.
>
> Yours,
> Laurenz Albe
>
>
view thread (5+ 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: wal segment size
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