Re: Postgres Parameters - Mailing list pgsql-admin

From Sam Stearns
Subject Re: Postgres Parameters
Date
Msg-id CAN6TVjmO7Tqd1RKqcjrD2LFFcrmSThx+CNuhjWKNHSGO6HVNEQ@mail.gmail.com
Whole thread Raw
In response to Re: Postgres Parameters  (Fabrice Chapuis <fabrice636861@gmail.com>)
List pgsql-admin
Awesome stuff.  Thank you, everyone!

Sam


On Tue, Nov 11, 2025 at 3:19 AM Fabrice Chapuis <fabrice636861@gmail.com> wrote:
Hi, You could also use this query, if the ratio is low, that means there is no pressure on wal size and you can keep the max_wal_size value as it is. SELECT num_timed, num_requested, round((num_requested: : numeric / NULLIF(num_timed + num_requested,
ZjQcmQRYFpfptBannerStart
This Message Is From an Untrusted Sender
You have not previously corresponded with this sender.
 
ZjQcmQRYFpfptBannerEnd
Hi,

You could also use this query, if the ratio is low, that means there is no pressure on wal size and you can keep the max_wal_size value as it is.

SELECT
  num_timed,
  num_requested,
  round((num_requested::numeric / NULLIF(num_timed + num_requested, 0)) * 100, 2)
    AS requested_pct
FROM pg_stat_checkpointer;
+-----------+---------------+---------------+
| num_timed | num_requested | requested_pct |
+-----------+---------------+---------------+
|      3502 |           146 |          4.00 |
+-----------+---------------+---------------+
(1 row)

Regards,

Fabrice


On Tue, Nov 11, 2025 at 12:28 AM Sam Stearns <sam.stearns@dat.com> wrote:
Howdy,

Could someone advise on how to determine the correct settings for the following, please?:

  • checkpoint_timeout
  • max_wal_size

Thank you,

Sam

--

Samuel Stearns
Team Lead - Database
c: 971 762 6879 | o: 971 762 6879 | DAT.com




--

Samuel Stearns
Team Lead - Database
c: 971 762 6879 | o: 971 762 6879 | DAT.com


pgsql-admin by date:

Previous
From: Fabrice Chapuis
Date:
Subject: Re: Postgres Parameters
Next
From: "zhenwei.li@sfere-elec.com"
Date:
Subject: Re: Re: Postgres Parameters