Re: Let's make PostgreSQL multi-threaded - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Let's make PostgreSQL multi-threaded
Date
Msg-id 20230614195139.tz7w6j24hxk4gnwc@awork3.anarazel.de
Whole thread Raw
In response to Re: Let's make PostgreSQL multi-threaded  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
Hi,

On 2023-06-13 16:55:12 +0900, Kyotaro Horiguchi wrote:
> At Tue, 13 Jun 2023 09:55:36 +0300, Konstantin Knizhnik <knizhnik@garret.ru> wrote in 
> > Postgres backend is "thick" not because of large number of local
> > variables.
> > It is because of local caches: catalog cache, relation cache, prepared
> > statements cache,...
> > If they are not rewritten, then backend still may consume a lot of
> > memory even if it will be thread rather then process.
> > But threads simplify development of global caches, although it can be
> > done with DSM.
> 
> With the process model, that local stuff are flushed out upon
> reconnection. If we switch to the thread model, we will need an
> expiration mechanism for those stuff.

Isn't that just doing something like MemoryContextDelete(TopMemoryContext) at
the end of proc_exit() (or it's thread equivalent)?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Mikhail Gribkov
Date:
Subject: Re: On login trigger: take three
Next
From: Andres Freund
Date:
Subject: Re: Should heapam_estimate_rel_size consider fillfactor?