Re: Let's make PostgreSQL multi-threaded

Heikki Linnakangas <hlinnaka@iki.fi>

From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Ranier Vilela <ranier.vf@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-06-05T17:43:17Z
Lists: pgsql-hackers
On 05/06/2023 13:32, Merlin Moncure wrote:
> Would this help with oom killer in linux?

Hmm, I guess the OOM killer would better understand what Postgres is 
doing, it's not very smart about accounting shared memory. You still 
wouldn't want the OOM killer to kill Postgres, though, so I think you'd 
still want to disable it in production systems.

> Isn't it true that pgbouncer provides a lot of the same benefits?

I guess there is some overlap, although I don't really think of it that 
way. Firstly, pgbouncer has its own set of problems. Secondly, switching 
to threads would not make connection poolers obsolete. Maybe in the 
distant future, Postgres could handle thousands of connections with 
ease, and threads would make that easier to achieve that, but that would 
need a lot of more work.

-- 
Heikki Linnakangas
Neon (https://neon.tech)