> So, Postgres is using process-per-connection model. Can some explain why this is? And why not something like thread-per-connection?
Thread vs process under Linux is kind of a potato potato thing. They are essentially the same thing - based on the flags provided when you create the process, you can indicate if you want things like shared memory or not. But they are ultimately the same construct, with similar overhead. Plus, fork() is incredibly useful.
It makes sense, for such an important piece of software, to minimize shared memory.