Re: Protect syscache from bloating with negative cache entries - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Protect syscache from bloating with negative cache entries
Date
Msg-id 20190214084010.bdn6tmba2j7szo3m@alap3.anarazel.de
Whole thread Raw
In response to Re: Protect syscache from bloating with negative cache entries  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: Protect syscache from bloating with negative cache entries  (Bruce Momjian <bruce@momjian.us>)
Re: Protect syscache from bloating with negative cache entries  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
Hi,

On 2019-02-13 15:31:14 +0900, Kyotaro HORIGUCHI wrote:
> Instead, I added an accounting(?) interface function.
> 
> | MemoryContextGettConsumption(MemoryContext cxt);
> 
> The API returns the current consumption in this memory
> context. This allows "real" memory accounting almost without
> overhead.

That's definitely *NOT* almost without overhead. This adds additional
instructions to one postgres' hottest set of codepaths.

I think you're not working incrementally enough here. I strongly suggest
solving the negative cache entry problem, and then incrementally go from
there after that's committed. The likelihood of this patch ever getting
merged otherwise seems extremely small.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: "Ideriha, Takeshi"
Date:
Subject: RE: Protect syscache from bloating with negative cache entries
Next
From: Andres Freund
Date:
Subject: Re: WAL insert delay settings