PostgreSQL reconsiders its process-based model [LWN.net]
In the fast-moving open-source world, programs can come and go quickly; a tool that has many users today can easily be eclipsed by something better next week. Even in this environment, though, some programs endure for a long time. As an example, consider the PostgreSQL database system, which traces its history back to 1986. Making fundamental changes to a large code base with that much history is never an easy task. As fundamental changes go, moving PostgreSQL away from its process-oriented model is not a small one, but it is one that the project is considering seriously.
, particularly on bigger machines. The overhead of
cross-process context switches is inherently higher than switching
between threads in the same process - and my suspicion is that that
overhead will continue to increase.
He also pointed out that the process model imposes costs on development,
forcing the project to maintain a lot of duplicated code, including several
memory-management mechanisms that would be unneeded in a single address
space. In a
later message he also added that it would be possible to share state
more efficiently between threads, since they all run within the same
address space