| From: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com> |
|---|---|
| To: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Postgres Parameters |
| Date: | 2025-11-11 01:16:50 |
| Message-ID: | CANzqJaD=bBAB95_gPGN4w+CfSkqiMv=qQL-WGPLmd6v4027iCg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
On Mon, Nov 10, 2025 at 6:28 PM Sam Stearns <sam(dot)stearns(at)dat(dot)com> 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!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Laurenz Albe | 2025-11-11 08:57:13 | Re: Postgres Parameters |
| Previous Message | Sam Stearns | 2025-11-10 23:28:21 | Postgres Parameters |