On 6/14/23 09:01, Kyotaro Horiguchi wrote:
> At Wed, 14 Jun 2023 08:46:05 +0300, Konstantin Knizhnik <knizhnik@garret.ru> wrote in
>> But I do not think that it is somehow related with using threads
>> instead of process.
>> The question whether to use private or shared cache is not directly
>> related to threads vs. process choice.
>
> Yeah, I unconsciously conflated the two things. We can use per-thread
> cache on multithreading.
For sure, and we can drop the cache when dropping the memory context.
And in the first versions of an imagined threaded PostgreSQL I am sure
that is how things will work.
Then later someone will have to investigate which caches are worth
making shared and what the eviction/expiration strategy should be.
Andreas