News for hackers. Stuff that matters.
Re:The Internals of PostgreSQL by hans_castorp on Thursday January 27, 2022 @04:15AM (#30098112)
> So, Postgres is using process-per-connection model. Can some explain why this is? And why not something like thread-per-connection?

This is explained in their Wiki "Things we do NOT want"

https://wiki.postgresql.org/wiki/Todo#Features_We_Do_Not_Wan...

> All backends running as threads in a single process (not wanted)

> This eliminates the process protection we get from the current setup. Thread creation is usually the same overhead as process creation on modern systems, so it seems unwise to use a pure threaded model, and MySQL and DB2 have demonstrated that threads introduce as many issues as they solve. Threading specific operations such as I/O, seq scans, and connection management has been discussed and will probably be implemented to enable specific performance features.

Re:The Internals of PostgreSQL by dmw_ng on Thursday January 27, 2022 @12:58PM (#30103763)
You can actually find some dissent from one of the core team in the linked thread: https://www.postgresql.org/message-id/CA%2BTgmobuHESqa%3Db5s...

Modern PG is already threaded out of necessity for many kinds of query, there's really no other way to fully exploit modern hardware (or indeed, much of the hardware released in the past 30 years).