public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ron Johnson <[email protected]>
To: Pgsql-admin <[email protected]>
Subject: Re: Postgres Parameters
Date: Mon, 10 Nov 2025 20:16:50 -0500
Message-ID: <CANzqJaD=bBAB95_gPGN4w+CfSkqiMv=qQL-WGPLmd6v4027iCg@mail.gmail.com> (raw)
In-Reply-To: <CAN6TVj=QOuZDGdZegGN1ac0GPM7DgoYMBAWOJHLM68KprMAW1Q@mail.gmail.com>
References: <CAN6TVj=QOuZDGdZegGN1ac0GPM7DgoYMBAWOJHLM68KprMAW1Q@mail.gmail.com>
On Mon, Nov 10, 2025 at 6:28 PM Sam Stearns <[email protected]> wrote:
> 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=off).
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
view thread (7+ 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]
Subject: Re: Postgres Parameters
In-Reply-To: <CANzqJaD=bBAB95_gPGN4w+CfSkqiMv=qQL-WGPLmd6v4027iCg@mail.gmail.com>
* 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