From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>, "ikedamsh(at)oss(dot)nttdata(dot)com" <ikedamsh(at)oss(dot)nttdata(dot)com>, 'Kyotaro Horiguchi' <horikyota(dot)ntt(at)gmail(dot)com> |
Cc: | "amit(dot)kapila16(at)gmail(dot)com" <amit(dot)kapila16(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "magnus(at)hagander(dot)net" <magnus(at)hagander(dot)net> |
Subject: | Re: New statistics for tuning WAL buffer size |
Date: | 2020-10-02 00:38:07 |
Message-ID: | 96cd53ad-90b6-26a2-20c6-61ea15270df8@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2020/10/01 10:50, tsunakawa(dot)takay(at)fujitsu(dot)com wrote:
> From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
>> Another reason that I mildly want to object to subdivided functions is
>> I was annoyed that a stats view makes many individual calls to
>> functions that internally share the same statistics entry. That
>> behavior required me to provide an entry-caching feature to my
>> shared-memory statistics patch.
>
> +1
> The views for troubleshooting performance problems should be as light as possible. IIRC, we saw frequently searching pg_stat_replication consume unexpectedly high CPU power, because it calls pg_stat_get_activity(null) to get all sessions and join them with the walsenders. At that time, we had hundreds of client sessions. We expected pg_stat_replication to be very lightweight because it provides information about a few walsenders.
I think that we can improve that, for example, by storing backend id
into WalSndCtl and making pg_stat_get_wal_senders() directly
get the walsender's LocalPgBackendStatus with the backend id,
rather than joining pg_stat_get_activity() and pg_stat_get_wal_senders().
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-10-02 00:47:29 | Re: Add information to rm_redo_error_callback() |
Previous Message | Michael Paquier | 2020-10-02 00:28:53 | Re: Should walsernder check correctness of WAL records? |