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 1vVvnW-009p6q-37 for pgsql-general@arkaria.postgresql.org; Wed, 17 Dec 2025 17:58:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vVvnV-00FYs8-2r for pgsql-general@arkaria.postgresql.org; Wed, 17 Dec 2025 17:58:50 +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 1vVvnV-00FYrz-1e for pgsql-general@lists.postgresql.org; Wed, 17 Dec 2025 17:58:50 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vVvnU-001BvQ-24 for pgsql-general@lists.postgresql.org; Wed, 17 Dec 2025 17:58:49 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-47789cd2083so33433845e9.2 for ; Wed, 17 Dec 2025 09:58:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1765994327; x=1766599127; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=Ld239YNXykuJEz+x9ZIEseJHJCLILOTqKovpOYJI2wo=; b=OgErRujWVcgMe8yilgqU8M3DKmAJWvk9Mecslemm9TdQSnFOJuze+d0W53efyGw6dC NDfG9jtHWXBz5ZtJei08anzqo8SPAdoP0IRPuaC72PLm8u9NrvKcE/kQ6NyqzL9hs1+x CVf0xgS+NooLDUheibm3yrfbBxl0iRpgCSABmPyglN+UeBK0BEi+4qyypyWIkR7ZEN9F PjQEvbEcY65gDAwffRahfuV02dBxgPm0iKaj59FE4PgtGWGsD1RDVEYY47eu2XPxYmMc QUeLZqQNI5ggGUIWdMK93tAe1SVQ14wV5K/PgQz6Dp/ydEQKuMOchz7qwdfzRhv3S5Sr XTKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765994327; x=1766599127; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ld239YNXykuJEz+x9ZIEseJHJCLILOTqKovpOYJI2wo=; b=cHUJSLHZ6dxIvhicscTW6uLr8GR8xw/zeGFLHSSnwTJRR1PvrBgDzStXbzic/TLT50 XuUU+6gGhMlMYTi1Va2wtGKtNhJjPTr6MsjWpJsDNlbxcVh0PxNwLCgP165DFzw7RZRx mRhT/6KitFknn3jLvr+qeSrrw9Amql+2DLzflgL2iYgcd4sDQwe1s5JamQdoavz6YHz1 vy5hznTvYEXfv4OsQPqU9rdFGJNEOkFcAQdBEDdQbKKWcYrX8zGoF4Z+PkHxJacaipbi Ce25+FxfGIMBUvI/P7beEyWeezTpwDxdqgoQR7cCRFdx78GVpWVSIq7U1RBzsFbqoj6w nuUA== X-Gm-Message-State: AOJu0YyQxAFcFqo5zluvciEsv/aFTd5GNEYIbmUCHY8hOlR0q9Yia/hJ e+B/c0ovj454csWH/EKrPOuRb9/1gjAhGVt9HLmjuqhjDKelqQxE0A0zSLAGwS/W+eI= X-Gm-Gg: AY/fxX4sGg5nFkOWsIzPHoaZyWJi6hH/be4DA7yKAZu3cL+5fFxxyfkgtnDVLeO0mlt wY72xUFz6n9fPc3bVMuZfaCy0qvkC+5arq2Tnr1I4BkS+UgQ8cE6seeCRfwXUr4Ri7QIP3HDshb QVR1ec0kFrrlLU1BhuvChq5cJ7dTwOI6/yECZ2SEsPR3iDECJfhmB5lCq5kxKSJ5EV0mrcOgtSW zUREuosNIQBYAMrEOg4HdUtxNJyHsJ3KG4GwiWixXweZH2V68P7d3qx+JjtLCgUBuHuVN+0aPpE ulkpulYNiKijAEVdP8ePIzs4IoFGZ7QUjCQGtPXdYhuEke65lSC0x/lcmhJIwP4o3L4FZDvREDJ 0YmK12rilCZxjhlISmutWx9QGQd7g+APvwBajd8AwwF18Z7QtmZKIBzYukwsj0Ou3NuWjZ4VnfV Ut0P7NSC7Xf9S830lzW1ttRjV32OI7bcTQXFD7d1bNdqXJaEiXTmM6+A== X-Google-Smtp-Source: AGHT+IG9g1B8OwZ64viSf5lPmyRLx6is5fWA86ICv32eZrAWEva368gwvMZPz9sXJeEKFeZooLUJRw== X-Received: by 2002:a5d:64e9:0:b0:430:fcbb:2e6b with SMTP id ffacd0b85a97d-430fcbb2ff9mr13319258f8f.27.1765994326744; Wed, 17 Dec 2025 09:58:46 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:270:4cf9:1875:33eb:6694:f468]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432449346c9sm258713f8f.5.2025.12.17.09.58.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Dec 2025 09:58:46 -0800 (PST) Message-ID: <4e2cfc51d3933a1df28e212ccb0b90f39633422a.camel@cybertec.at> Subject: Re: wal segment size From: Laurenz Albe To: Greg Sabino Mullane , Colin 't Hart Cc: PostgreSQL General Date: Wed, 17 Dec 2025 18:58:45 +0100 In-Reply-To: References: <2a301859ab47c2e83ba5c8ebf75112d61246a8cd.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2025-12-17 at 12:21 -0500, Greg Sabino Mullane wrote: > On Wed, Dec 17, 2025 at 11:10=E2=80=AFAM Colin 't Hart wrote: > > Thanks Laurenz, that confirms what I was assuming. Archiving is via pgb= ackrest > > to a backup server, over SSH. Approx 750ms to archive each segment is c= razy -- > > I'll check compression parameters too. >=20 > Switch to archive-async =3D on. When doing that, the typical time drops t= o 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 t= he 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