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 1vId0O-007vpK-37 for pgsql-admin@arkaria.postgresql.org; Tue, 11 Nov 2025 01:17:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vId0M-003Oqr-0G for pgsql-admin@arkaria.postgresql.org; Tue, 11 Nov 2025 01:17:06 +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 1vId0L-003Oqj-2J for pgsql-admin@lists.postgresql.org; Tue, 11 Nov 2025 01:17:05 +0000 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vId0J-006SvD-0u for pgsql-admin@lists.postgresql.org; Tue, 11 Nov 2025 01:17:04 +0000 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-656d9230cf2so1326017eaf.1 for ; Mon, 10 Nov 2025 17:17:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762823822; x=1763428622; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=vnWJoY3R8+NdHQ0CLJjiUA3G00/3MXSznA7HsXkw4xw=; b=LNRrSHt/3cg2mRzH2XGlqZsOUDipbVG/DOUmT9kJIZx0JlYHrRKDroPcTg54NbVmum UXiBsBFr8ZKvdv73YjxLRgAsqFlX+x+w5YKahth29g/aE/OWNdtoElI5vrpjykoBL4Kj Glu9vwnMIg1VqFtS5EQF8bk/uXNB2PbvVM37BaHxMk4uLgHZ7maIH3sED1QmaINpH2hF 7wlSsUkbHczHmqSeKaJYSLL9YhRiVy2+USLytNPYsz7d3oED+zeEz2NsnSqKv24+GV6d Zl0Dv87Obdl9TEtanHlXpdMnSBYfhG1ZNQ8+vrUIVh3Hbj924Lh9nMU2qaL9Dhdl9T/t F6jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762823822; x=1763428622; h=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=vnWJoY3R8+NdHQ0CLJjiUA3G00/3MXSznA7HsXkw4xw=; b=PeEs31AHWg0FbBlgXd6pHJlzc80nlfyJw9G5NmUT0tlT0vYijughw7ofl3hR0eq9rZ THCGmf+hEipThnkbB2l7ZRBC8E1ueEo+x+Z1RU62p84fmVLSf5ZPZx8TWerHGbrnIi7Q VEcs/0uwH1PlFh5Us83IxiW8Cm2zBf5B9r1hU7erCLwIgV4hPzvPfxj1jfQ+f3nzqJ7H X/2gZsRdNE/M1SSyJ7357zbaGJuQ8/fdEzHKR+SkKrTPNtsd+JSYwoNYtrzBDAti5NV8 3iPCYFrRioZ43ZlrXm/yQMWn5wAsspyVXtHMVuC1bMvoA1HO5ksBaYr2qPzmY60+uegq Wj1Q== X-Gm-Message-State: AOJu0YygSWdvCskvpIfNNB0tOpNCiIWDtqUqcUGVHDGMztugyJmGBwdC 4vp6B9nd8wau7muiNXE5NVKfYV/gV6ryfddl0m4GJjxK4uDQrw71/pCEpf9BAtLYO061nR6F+tS eeh7r6Fbd+/DMv+0kNFlpH8vlJZthJ9lUIO4+ X-Gm-Gg: ASbGnctLFLy+XIGQ4WT5zK9F2QYg8R7WxgqQOjhznF7/mbz4y9qZ3TC0BmmPaFOn+wu 6ipQWnMnZQtYY6oi+H7con/esF3/51XJ+83Lc5hrjTY9hjFwUhXnRY917KcP/5oo0YmJ/5phGgT hf0HH5luVqb+qb2f8wzdrQclK7o6x/Fv7J9SIvMMJ6qs/MWTpgPpWG+hipizDNp2hqAEcv229y0 wAP5HZlnFPyFBQZmtvza+qjiD4EM3FhBuWGbly8+L7MSq7wDqPQXRFApTM8TUeGq8IsU/Mq X-Google-Smtp-Source: AGHT+IH/GHW3OuyTy4iyP0UWvMOaCRSyuJXmJcpRhTAimL/uKTH7j7Fyf+fHepExFezLEsrc0TX//jt9ub331JIoXLc= X-Received: by 2002:a05:6808:80c1:b0:441:d05b:abbe with SMTP id 5614622812f47-4502a1715f0mr6438287b6e.5.1762823822310; Mon, 10 Nov 2025 17:17:02 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Mon, 10 Nov 2025 20:16:50 -0500 X-Gm-Features: AWmQ_bmKt7fn8TKJDPAECko_oJwUGejlw1nIxHJWE6CvL5K-lKQ2qllSPcKWvLY Message-ID: Subject: Re: Postgres Parameters To: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000baffa706434767f7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000baffa706434767f7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 10, 2025 at 6:28=E2=80=AFPM Sam Stearns w= rote: > Howdy, > > Could someone advise on how to determine the correct settings for the > following, please?: > > > > - checkpoint_timeout > - max_wal_size > > https://postgresqlco.nf/doc/en/param/ is a great web site. How busy are your systems? I sometimes set max_wal_size to be 6GB or 12GB, and sometimes the default. As https://www.postgresql.org/docs/17/runtime-config-wal.html#GUC-MAX-WAL-SIZE says, "This is a soft limit; WAL size can exceed max_wal_size under special circumstances, such as heavy load". Leave it at the default, and then search the log files for complaints about checkpointing too often. No complaints? Leave at the default. Complaints? Bump it up. My standard checkpoint_timeout is 15 minutes, for Unremembered Reasons. Things work, so I have no need to change. If the disk with our WAL files crashes (not very likely), we *probably* lose at most 15 minutes of data. When doing a multi-TB pg_restore to an empty database, I bump checkpoint_time to 30m and max_wal_size to 32GB (and use dangerous settings like fsync=3Doff). --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000baffa706434767f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Nov 10, 2025 at 6:28=E2=80=AFPM S= am Stearns <sam.stearns@dat.com> wrote:
Howdy,

Could someone advise on how to determine the correct = settings for the following, please?:
=C2=A0
=
  • checkpoint_timeout
  • max_wal_size
https://postgresqlco.nf/doc/en/param/ is a great web site.=C2=A0

How busy are your systems?

I sometimes set max_wal_size to be 6GB or 12GB, and somet= imes the default.=C2=A0 As=C2=A0https://www.postgresql.org/doc= s/17/runtime-config-wal.html#GUC-MAX-WAL-SIZE says, "This is a sof= t limit; WAL size can exceed max_wal_size under special circumstances, such= as heavy load".=C2=A0 Leave it at the default, and then search the lo= g files for complaints about checkpointing too often.=C2=A0 No complaints?= =C2=A0 Leave at the default.=C2=A0 Complaints?=C2=A0 Bump it up.
=
My standard=C2=A0checkpoint_timeout is 15 minutes, for Unrem= embered Reasons.=C2=A0 Things work, so I have no need to change.
=
If the disk with our WAL files crashes (not very likely), we= probably lose at most 15 minutes of data.

= When doing a multi-TB pg_restore to an empty database, I bump checkpoint_ti= me to 30m and max_wal_size to 32GB (and use dangerous settings like fsync= =3Doff).

--
Death to= <Redacted>, and butter sauce.
Don't boil me, I'm still a= live.
<Redacted> lobster!
<= /div> --000000000000baffa706434767f7--