Re: Protect syscache from bloating with negative cache entries

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: david(at)pgmasters(dot)net
Cc: michael(dot)paquier(at)gmail(dot)com, Jim(dot)Nasby(at)bluetreble(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, robertmhaas(at)gmail(dot)com, craig(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Protect syscache from bloating with negative cache entries
Date: 2017-10-31 09:46:22
Message-ID: 20171031.184622.92520047.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This is a rebased version of the patch.

At Fri, 17 Mar 2017 14:23:13 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote in <20170317(dot)142313(dot)232290068(dot)horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
> At Tue, 7 Mar 2017 19:23:14 -0800, David Steele <david(at)pgmasters(dot)net> wrote in <3b7b7f90-db46-8c37-c4f7-443330c3ae33(at)pgmasters(dot)net>
> > On 3/3/17 4:54 PM, David Steele wrote:
> >
> > > On 2/1/17 1:25 AM, Kyotaro HORIGUCHI wrote:
> > >> Hello, thank you for moving this to the next CF.
> > >>
> > >> At Wed, 1 Feb 2017 13:09:51 +0900, Michael Paquier
> > >> <michael(dot)paquier(at)gmail(dot)com> wrote in
> > >> <CAB7nPqRFhUv+GX=eH1bo7xYHS79-gRj1ecu2QoQtHvX9RS=JYA(at)mail(dot)gmail(dot)com>
> > >>> On Tue, Jan 24, 2017 at 4:58 PM, Kyotaro HORIGUCHI
> > >>> <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> > >>>> Six new syscaches in 665d1fa was conflicted and 3-way merge
> > >>>> worked correctly. The new syscaches don't seem to be targets of
> > >>>> this patch.
> > >>> To be honest, I am not completely sure what to think about this patch.
> > >>> Moved to next CF as there is a new version, and no new reviews to make
> > >>> the discussion perhaps move on.
> > >> I'm thinking the following is the status of this topic.
> > >>
> > >> - The patch stll is not getting conflicted.
> > >>
> > >> - This is not a hollistic measure for memory leak but surely
> > >> saves some existing cases.
> > >>
> > >> - Shared catcache is another discussion (and won't really
> > >> proposed in a short time due to the issue on locking.)
> > >>
> > >> - As I mentioned, a patch that caps the number of negative
> > >> entries is avaiable (in first-created - first-delete manner)
> > >> but it is having a loose end of how to determine the
> > >> limitation.
> > > While preventing bloat in the syscache is a worthwhile goal, it
> > > appears
> > > there are a number of loose ends here and a new patch has not been
> > > provided.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
0001-Cleanup-negative-cache-of-pg_statistic-when-dropping.patch text/x-patch 22.9 KB
0002-Cleanup-negative-cache-of-pg_class-when-dropping-a-s.patch text/x-patch 21.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2017-10-31 09:48:07 Re: show "aggressive" or not in autovacuum logs
Previous Message Kyotaro HORIGUCHI 2017-10-31 09:43:10 Re: Restricting maximum keep segments by repslots