On Wed, Jun 10, 2026 at 6:10 AM Quan Zongliang <[email protected]> wrote:
[..]
> When the database is idle for a long time. Will keep outputting
>
> LOG:  postmaster stats: avg 0.00 conns/sec; 0.00 disconns/sec; 0.00
> parallel workers started/sec; CPU: user:  ...
> LOG:  postmaster stats: avg 0.00 conns/sec; 0.00 disconns/sec; 0.00
> parallel workers started/sec; CPU: user:  ...
> LOG:  postmaster stats: avg 0.00 conns/sec; 0.00 disconns/sec; 0.00
> parallel workers started/sec; CPU: user:  ...
>
> Could it be considered to reduce the output frequency when conn_delta,
> disc_delta and pqw_delta are all zero?
> Or until a new connection is established, then output the log for the
> idle period at one time. Just like:
>
> LOG:  postmaster stats: avg 0.00 conns/sec; 0.00 disconns/sec; 0.00
> parallel workers started/sec; CPU: user: 0.00 s, system: 0.00 s,
> elapsed: 1hours 10min 32s
> LOG:  postmaster stats: avg 0.30 conns/sec; 0.20 disconns/sec; 1.10
> parallel workers started/sec; CPU: user: 0.00 s, system: 0.00 s,
> elapsed: 10.00 s

Hi Quan,

thanks for trying out the patch! To be honest, I don't have opinion on
this, we could do that if there's community agreement to do this (or
some committer wants it this way or that way), but right now e.g.
checkpoint_timeout (which serves similiar purpose) does not behave
like that and always logs stuff and I was been told we should do
things consistently.

As for reducing logs volume, I think one could just use threshold
of 1 or 10 minutes (but while assessing some production issues one
could bump it down to every 1s temporarily just to have data to have
much better understandind what was system/postmaster doing).

-J.


Reply via email to