From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com |
Cc: | GavinFlower(at)archidevsys(dot)co(dot)nz, bruce(at)momjian(dot)us, robertmhaas(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, ideriha(dot)takeshi(at)jp(dot)fujitsu(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, alvherre(at)alvh(dot)no-ip(dot)org, andres(at)anarazel(dot)de, michael(dot)paquier(at)gmail(dot)com, david(at)pgmasters(dot)net, Jim(dot)Nasby(at)bluetreble(dot)com, craig(at)2ndquadrant(dot)com |
Subject: | Re: Protect syscache from bloating with negative cache entries |
Date: | 2019-01-23 08:35:02 |
Message-ID: | 20190123.173502.237450969.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Mon, 21 Jan 2019 17:22:55 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote in <20190121(dot)172255(dot)226467552(dot)horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
> An option is an additional PGPROC member and interface functions.
>
> struct PGPROC
> {
> ...
> int syscahe_usage_track_interval; /* track interval, 0 to disable */
>
> =# select syscahce_usage_track_add(<pid>, <intvl>[, <repetition>]);
> =# select syscahce_usage_track_remove(2134);
>
>
> Or, just provide an one-shot triggering function.
>
> =# select syscahce_take_usage_track(<pid>);
>
> This can use both a similar PGPROC variable or SendProcSignal()
> but the former doesn't fire while idle time unless using timer.
The attached is revised version of this patchset, where the third
patch is the remote setting feature. It uses static shared memory.
=# select pg_backend_catcache_stats(<pid>, <millis>);
Activates or changes catcache stats feature on the backend with
PID. (The name should be changed to .._syscache_stats, though.)
It is far smaller than the remote-GUC feature. (It contains a
part that should be in the previous patch. I will fix it later.)
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
v8-0001-Remove-entries-that-haven-t-been-used-for-a-certain-.patch | text/x-patch | 15.2 KB |
v8-0002-Syscache-usage-tracking-feature.patch | text/x-patch | 37.8 KB |
v8-0003-Remote-setting-feature-for-catcache-statitics.patch | text/x-patch | 9.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Donald Dong | 2019-01-23 08:44:28 | Analyze all plans |
Previous Message | David Rowley | 2019-01-23 08:33:11 | Re: pg_dump multi VALUES INSERT |