Re: wal segment size - Mailing list pgsql-general

From Laurenz Albe
Subject Re: wal segment size
Date
Msg-id 4e2cfc51d3933a1df28e212ccb0b90f39633422a.camel@cybertec.at
Whole thread Raw
In response to Re: wal segment size  (Greg Sabino Mullane <htamfids@gmail.com>)
Responses Re: wal segment size
List pgsql-general
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 <colinthart@gmail.com> 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



pgsql-general by date:

Previous
From: Igor Korot
Date:
Subject: Re: [GENERAL] Retrieving query results
Next
From: Tom Lane
Date:
Subject: Re: Record last SELECT on a row?