Re: pg_stat_io for the startup process - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pg_stat_io for the startup process
Date
Msg-id CA+TgmoZt1oqrp6EyEV6_+QL8TLmvs_sEQr1wjC--jTHW1D3-+A@mail.gmail.com
Whole thread Raw
In response to Re: pg_stat_io for the startup process  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: pg_stat_io for the startup process
List pgsql-hackers
On Wed, Apr 26, 2023 at 5:47 AM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
> 3. When should we call pgstat_report_stats on the startup process?
>
> During recovery, I think we can call pgstat_report_stats() (or a
> subset of it) right before invoking WaitLatch and at segment
> boundaries.

I think this kind of idea is worth exploring. Andres mentioned timers,
but it seems to me that something where we just do it at certain
"convenient" points might be good enough and simpler. I'd much rather
have statistics that were up to date as of the last time we finished a
segment than have nothing at all.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
Next
From: Aleksander Alekseev
Date:
Subject: Re: [PATCH] Infinite loop while acquiring new TOAST Oid