Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The code already is multithreaded. They have shared state just across multiple processes instead of threads within a process.

They might even reduce complexity that way.



It's not the same at all for global variables, of which pgsql apparently has around a couple thousand.

If every process is single threaded, you don't have to consider the possibility of race conditions when accessing any of those ~2000 global variables. And you can pretty much guarantee that little if any of the existing code was written with that possibility in mind.


Those global variables would be converted to thread locals and most of the code would be oblivious of the change. This is not the hard part of the change.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: