logoalt Hacker News

petcatyesterday at 8:15 PM2 repliesview on HN

Woof. That sounds very complicated. If you need that kind of write concurrency, use an unlogged table in postgres [0]. Then you don't have to invent a whole sharded thing yourself.

[0] https://www.postgresql.org/docs/current/sql-createtable.html...


Replies

nemothekidyesterday at 9:24 PM

There are so many unfortunate footguns with unlogged tables, that I'd argue that the goroutine route is preferable.

show 2 replies
glzone1today at 6:00 AM

Running postgresql is an order of magnitude more complicated than sqlite.

130k tps even with unlogged is not always super easy especially if getting hit concurrently. Postgresql connection overhead alone can be pretty brutal if you are setting up and tearing down connections or have 1,000 writers etc.

Postgresql generally requires good network connectivity. Folks doing sqlite distributed tend to have everything independent, you literally don't need to worry about connection / security / firewall / permissioning / internode escape or data leaking etc, can even have problems in local side networking and services can still serve.

show 1 reply