Comments on: Should PostgreSQL Become Multi-Threaded? https://www.percona.com/blog/should-postgresql-become-multi-threaded/ Mon, 06 Nov 2023 15:40:49 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Ivan Baldo https://www.percona.com/blog/should-postgresql-become-multi-threaded/#comment-10974093 Mon, 19 Jun 2023 21:33:57 +0000 https://www.percona.com/blog/?p=88563#comment-10974093 In reply to Peter Zaitsev.

Do you mean an event based architecture?
That would be even more optimal.

]]>
By: Peter Zaitsev https://www.percona.com/blog/should-postgresql-become-multi-threaded/#comment-10974090 Thu, 15 Jun 2023 20:02:25 +0000 https://www.percona.com/blog/?p=88563#comment-10974090 In reply to Joshua D. Drake.

I’m not expecting change to be easy and safety concerns may push the team to stick to satus quo. While Pre-fork can help with overhead of creating the process it does nothing for cost of switching between processes vs cost of switching between threads.

You of course can imagine process based architecture where such switch is not happening – like fixed number of processes each bound to specific cpu core/thread and managing multiple queries per process, but change to such architecture is likely to be even harder.

]]>
By: Joshua D. Drake https://www.percona.com/blog/should-postgresql-become-multi-threaded/#comment-10974088 Wed, 14 Jun 2023 17:47:07 +0000 https://www.percona.com/blog/?p=88563#comment-10974088 There isn’t really much stomach for this in the community and this is a topic that has come across the lists more than once over the years. There is just too much investment in making the existing model reliable. It would also break so much stuff in the wild.

One item that would help is if PostgreSQL were to engineer processes to prefork (Ala Apache).

]]>