Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVu6m-009aAs-1f for pgsql-general@arkaria.postgresql.org; Wed, 17 Dec 2025 16:10:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vVu6l-00ELjK-1Q for pgsql-general@arkaria.postgresql.org; Wed, 17 Dec 2025 16:10:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVu6l-00ELiv-0J for pgsql-general@lists.postgresql.org; Wed, 17 Dec 2025 16:10:35 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vVu6j-001Avc-0b for pgsql-general@lists.postgresql.org; Wed, 17 Dec 2025 16:10:34 +0000 Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-bf1b402fa3cso5600761a12.3 for ; Wed, 17 Dec 2025 08:10:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765987832; x=1766592632; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5bZCnWjlcA+IYVF2aZjuhWeg2EF4d2Ae3+fnWugys1c=; b=dv1byEyk4Dfr5eYR06Mqpq1YxD44gIyG0jwnaXfeAqK3JleHzRN7oSyKikK+8xNiz3 GjVC5YFGovftmDTKZolrQDgW9bPfGob/icTyV9FtuCJsRbwbj89FsFKrpYK13ioBj4I1 gu04KcXFWtY8aLXsJNADNvYXByhtKfHvRyXbaEKBthOQIJEm1Aqs09mFwOf6J/TauYUZ THmKM+PB7vHzCsDzmDk8P9puOFzkaO83U7zu1EBQnSWdmr+bHuhsHI1Xbro+N60Td4rQ XV3hLaoKDtwa0ZMoECPjkvYaIavvytktIFkYu6C2Cskz2b7YxwtkjbjtnKCNWJcpdk2g tVYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765987832; x=1766592632; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5bZCnWjlcA+IYVF2aZjuhWeg2EF4d2Ae3+fnWugys1c=; b=cQM6aZNHal8UqJmfxLFZc6kOBb1NJW4yZ+I+n/PofH0EVe/3Lh7OT6Qwbqt4vz+WFg EIK/XLZWjahXKzge3G74Uu/vC00gVIXGkWhqy6byhkro1q5Ht0Y2yeJ9pyGbE0Ck/zLk 6PfsqIfTeabSPKh58szYSNQ8K+i5Hxs9QPxLpOk8feuMXONAxQU1R9jeVj4ehe081LfK iM/9nEk0OEGW69bLWknaiuyNPrGur/bLmrBv1AGwEYk8beh2gldM9IxAVvlDBZQRKDvC z5MagPuh7MdnXQyruqLnSMcOycJD884vGDESGViPTeK7kdK65iV39MODPh8Q2oP2VXDw Tzog== X-Gm-Message-State: AOJu0Yy+Ri/xlKOIjNHdhPXmlFg9Fwz2mfB0VFHcOi1DCrBDM9yliB+b e6yxdMbExE274Z6S9Nzx2JwY3+ZHNaOfjozG+ybKK+JY9dfa0HwG/iufRGUR9NmOGeD2q0INFJt P3ZcyHSTnEspCBzCHEfhUVlqATb+8I3x55g== X-Gm-Gg: AY/fxX7cmC55W4RCPxrHDEaZJFDRIQziFHQK/h/sKSDGGKg7r5RV96JWcoSP6gctypq hWn4VJVTDH2IP0SqfNY6GTpB53VbD9DpEMMDpfLCza0BfykZukEYNm7JrFayWRiNLWWK+5MQGOJ ub0HOhUMs9w0Ap7s++QbATsZ7a40eU2uci38hb+c3kVVimpbkSPZYP63tiItRAgljvF6yH/eNWP v2+8fpfcMtNilNYb/ZMBPmRNGVRmgUGm2xCP66dTyJyAvrOcrVEEZJVHWab3R1zZTbgy+CobpAE 8/4YeT7zghiFNCWVC18E/xoTHdUH1d+sf0D37l++yKdbJ80G58NZFkKJl726mqb/1MYAH9dMfj+ cdz6F00Sj6r15JqzCfzp+lZW/rd8Qb1tmRprAJOA/AmpbFw+EkchbytWlImSoMGVsqgaD6ObqD3 CHQ+Y= X-Google-Smtp-Source: AGHT+IGSrl6W4eB5Lca7MyrgB4JnsKQrJY+taHQqFbUpqh3XmYnJDZ2yQYRzQVNPMotP2UhwZVawFRHdvi97FZdDHk4= X-Received: by 2002:a05:7023:a8b:b0:11e:3e9:3ea3 with SMTP id a92af1059eb24-11f34c4f80amr13092319c88.50.1765987831599; Wed, 17 Dec 2025 08:10:31 -0800 (PST) MIME-Version: 1.0 References: <2a301859ab47c2e83ba5c8ebf75112d61246a8cd.camel@cybertec.at> In-Reply-To: <2a301859ab47c2e83ba5c8ebf75112d61246a8cd.camel@cybertec.at> From: "Colin 't Hart" Date: Wed, 17 Dec 2025 17:10:19 +0100 X-Gm-Features: AQt7F2rjJkQfRLVWxcuLc3aCjPGQt8pENFCdDEGIFbAdncTrNHfR8QV7ZyiAqIo Message-ID: Subject: Re: wal segment size To: Laurenz Albe Cc: PostgreSQL General Content-Type: multipart/alternative; boundary="00000000000061569f06462815ce" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000061569f06462815ce Content-Type: text/plain; charset="UTF-8" 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. Any reason not to bump it up to 1GB? Or is that overkill? /Colin On Wed, 17 Dec 2025 at 16:25, Laurenz Albe wrote: > On Wed, 2025-12-17 at 16:13 +0100, Colin 't Hart wrote: > > I see very little advice on tuning WAL segment size. > > > > One of my clients has a few datawarehouses at around 8 - 16 TB > > > > On one of the nodes there are approx 15000 WAL segments of 16MB each, > totalling > > approx 230GB. The archiver is archiving approx one per second, so approx > 4 hours to clear. > > > > Would we gain anything by bumping the WAL segment size? > > Very likely yes, if the problem is the overhead of starting the > archive_command. > > Another thing that can slow down archiving is if you compress these > segments > too aggressively. > > Yours, > Laurenz Albe > --00000000000061569f06462815ce Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Laurenz, that confirms what I was assuming. Ar= chiving is via pgbackrest to a backup server, over SSH. Approx 750ms to arc= hive each segment is crazy -- I'll check compression parameters too.

Any reason not to bump it up to 1GB? Or is that over= kill?

/Colin

On Wed, 17= Dec 2025 at 16:25, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Wed, 2025-12-17 at 16:13 +0100, Colin '= ;t Hart wrote:
> I see very little advice on tuning WAL=C2=A0segment=C2=A0size.
>
> One of my clients has a few datawarehouses=C2=A0at around 8 - 16 TB >
> On one of the nodes there are approx 15000 WAL segments of 16MB each, = totalling
> approx 230GB. The archiver is archiving approx one per second, so appr= ox 4 hours to clear.
>
> Would=C2=A0we gain anything by bumping the WAL=C2=A0segment size?

Very likely yes, if the problem is the overhead of starting the archive_com= mand.

Another thing that can slow down archiving is if you compress these segment= s
too aggressively.

Yours,
Laurenz Albe
--00000000000061569f06462815ce--