From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, masao(dot)fujii(at)oss(dot)nttdata(dot)com, pgsql-hackers(at)postgresql(dot)org, melanieplageman(at)gmail(dot)com |
Subject: | Re: pg_stat_io for the startup process |
Date: | 2023-05-21 22:14:23 |
Message-ID: | 20230521221423.jhl5mfyzvujxpjnd@awork3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I don't really feel confident we're going to get the timeout approach solid
enough for something going into the tree around beta 1.
How about this, imo a lot simpler, approach: We flush stats whenever replaying
a XLOG_RUNNING_XACTS record. Unless the primary is idle, it will log those at
a regular interval. If the primary is idle, we don't need to flush stats in
the startup process, because we'll not have done any io.
We only log XLOG_RUNNING_XACTS when wal_level >= replica, so stats wouldn't
get regularly flushed if wal_level = minimal - but in that case the stats are
also not accessible, so that's not a problem.
It's not the prettiest solution, but I think the simplicity is worth a lot.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Jonathan S. Katz | 2023-05-21 23:51:50 | Re: PG 16 draft release notes ready |
Previous Message | Bruce Momjian | 2023-05-21 19:57:57 | Re: PG 16 draft release notes ready |