|
|
|
|
|
by jitl
333 days ago
|
|
Postgres has really not solved problems that come with being a networked server and will collapse under concurrent connections far before you start to feel it with SQLite. 5000 concurrent connections will already start to deadlock your Postgres server; each new connection in Postgres is a new Postgres process and the state for the connection needs to be written to various internal tracking tables. It has a huge amount of overhead; connection pooling in PG is required and often the total system has a rather low fixed limit compared to idk, writing 200 lines of python code or whatever and getting orders of magnitude more connections out of a single machine. |
|
Check the throughput graphs from this blog post from 2020 (for improvements I made to connection scalability):
https://techcommunity.microsoft.com/blog/adforpostgresql/imp...
That's for read-mostly work. If you do write very intensely, you're going to see more contention earlier. But that's way way worse with sqlite, due to its single writer model.
EDIT: Corrected year.