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

From Robert Haas
Subject Re: Protect syscache from bloating with negative cache entries
Date
Msg-id CA+TgmoYBBjna12H8iJtuhrQGhbpuLeiHoE5dCbJBugn=MiPfog@mail.gmail.com
Whole thread Raw
In response to Re: Protect syscache from bloating with negative cache entries  (Andres Freund <andres@anarazel.de>)
Responses Re: Protect syscache from bloating with negative cache entries  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Thu, Mar 1, 2018 at 1:54 PM, Andres Freund <andres@anarazel.de> wrote:
> So this is hardcoded, without any sort of cache pressure logic? Doesn't
> that mean we'll often *severely* degrade performance if a backend is
> idle for a while?

Well, it is true that if we flush cache entries that haven't been used
in a long time, a backend that is idle for a long time might be a bit
slow when (and if) it eventually becomes non-idle, because it may have
to reload some of those flushed entries.  On the other hand, a backend
that holds onto a large number of cache entries that it's not using
for tens of minutes at a time degrades the performance of the whole
system unless, of course, you're running on a machine that is under no
memory pressure at all.  I don't understand why people keep acting as
if holding onto cache entries regardless of how infrequently they're
being used is an unalloyed good.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: "failed to find parent tuple for heap-only tuple" error as anERRCODE_DATA_CORRUPTION ereport()
Next
From: Andres Freund
Date:
Subject: Re: Protect syscache from bloating with negative cache entries