3 ms·
Examine any other distributed system that implements pipelining. Allows for multiple pending requests on a connection (simply by having IDs on every request) w
by thdxr 8y ago
Examine any other distributed system that implements pipelining. Allows for multiple pending requests on a connection (simply by having IDs on every request) which makes for efficient use of connections.
- doh 8y agoI do understand where are you coming from, but there is price to everything. Most distributed systems have eventual consistency. Very few can achieve strong consistency. Postgres sacrifices a lot for a strong consistency and predictable performance. I'm not saying that PG has the best model, but for the wast majority of users, out of connections is just not an issue. Most clients have now direct pooling and they are very easy to setup. There are a few who need more connections, but there are poolers for it. What you gain but separating connections is much easier monitoring and debugging process. You can examine each connection, its impact on resources, state, what locks they need to acquired, ... Additionally, because each connection opens a file descriptor, you gain a lot of operating security from the underlying OS and its kernel. PG contributors spent almost 3 decades building on this system. I'm pretty sure the gain would be so minuscule in comparison to the effort that would have to be put in to rebuild the connection model. I for one would appreciate server polling built in, better HA including simple discoverability, handoffs, ...