if nostr used postgres and not lmdb then it wouldn’t work. The damus relay was pegged at 100% cpu with postgres. lmdb is actually the perfect match for nostr.
Login to reply
Replies (2)
You are are something wrong.
Ditto works just fine with postgres and is a relay blaster.
Mastodon also uses postgres to support way more users than nostr will ever see.
If you mean postgres without custom configuration, absolutely. But postgres can run entirely in memory via mmap just like LMDB does.
Nonetheless I find it too heavyweight to configure and manage whereas LMDB is just compiled in, doesn't need the multiple-client stuff, the SQL parsing, the query planner, etc... if you code that stuff into your client, which can be done when the queries are not too numerous or complex.
So yeah I like LMDB better for this use case, but my brother the postgres core dev insists postgres can do key-value, nosql, all-in-memory, etc, just as good as the other databses. I say "there there little brother, I'm sure it's real good."