Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-14 Thread Tom Lane
Alvaro Herrera writes: > On 2021-May-14, Tom Lane wrote: >> 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 ex

Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-14 Thread Tom Lane
Andres Freund writes: > On 2021-05-14 16:53:16 -0400, Tom Lane wrote: >> 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 spe

Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-14 Thread Alvaro Herrera
On 2021-May-14, Tom Lane wrote: > 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

Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-14 Thread Andres Freund
Hi, On 2021-05-14 16:53:16 -0400, Tom Lane wrote: > Andres Freund 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 tes

Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-14 Thread Tom Lane
Andres Freund 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 don

Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-12 Thread Andres Freund
Hi, On 2021-05-11 19:02:00 -0700, Andres Freund wrote: > I don't think we'd loose a lot of practical coverage if we avoided > rebuilding non-accessed relcache entries eagerly during cache > lookups. What coverage do we e.g. gain by having a single > SearchCatCacheMiss() triggering rebuilding the r

Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-11 Thread Andres Freund
Hi, On 2021-05-11 19:02:00 -0700, Andres Freund wrote: > Why would rebuilding non-accessed relcache entries over and over help > with that? I am not proposing that we do not mark all cache entries are > invalid, or that we do not rebuild tables that aren't accessed. A slightly more concrete propo

Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-11 Thread Andres Freund
Hi, On 2021-05-11 19:30:48 -0400, Tom Lane wrote: > > IMO the problem largely stems from eagerly rebuilding *all* relcache entries > > during invalidation processing. > > Uh, we don't do that; only for relations that are pinned, which we > know are being used. Sorry, all surviving relcache entrie

Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-11 Thread Tom Lane
Andres Freund writes: > On 2021-05-11 12:03:33 -0400, Tom Lane wrote: >> In some recent threads I complained about how CLOBBER_CACHE_ALWAYS >> test runs have gotten markedly slower over the past couple of release >> cycles [1][2][3]. > I wonder if the best way to attack this in a more fundamental

Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-11 Thread Andres Freund
Hi, On 2021-05-11 12:03:33 -0400, Tom Lane wrote: > In some recent threads I complained about how CLOBBER_CACHE_ALWAYS > test runs have gotten markedly slower over the past couple of release > cycles [1][2][3]. I wonder if the best way to attack this in a more fundamental manner would be to handl