Re: Some other CLOBBER_CACHE_ALWAYS culprits

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Some other CLOBBER_CACHE_ALWAYS culprits
Date: 2021-05-14 20:53:16
Message-ID: 2193375.1621025596@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> In essence, debug_invalidate_system_caches_always=1 in some important aspects
> behaves like debug_invalidate_system_caches_always=3, due to the syscache
> involvement.

Yeah. I think it's important to test those recursive invalidation
scenarios, but it could likely be done more selectively.

> What about having a mode where each "nesting" level of SearchCatCacheMiss
> allows only one interior InvalidateSystemCaches()?

An idea I'd been toying with was to make invals probabilistic, that is
there would be X% chance of an inval being forced at any particular
opportunity. Then you could dial X up or down to make a tradeoff
between speed and the extent of coverage you get from a single run.
(Over time, you could expect pretty complete coverage even with X
not very close to 1, I think.)

This could be extended to what you're thinking about by reducing X
(according to some rule or other) for each level of cache-flush
recursion. The argument to justify that is that recursive cache
flushes are VERY repetitive, so that even a small probability will
add up to full coverage of those code paths fairly quickly.

I've not worked out the math to justify any specific proposal
along this line, though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-05-14 21:25:53 Re: Some other CLOBBER_CACHE_ALWAYS culprits
Previous Message Tom Lane 2021-05-14 20:23:37 Re: OOM in spgist insert