News for hackers. Stuff that matters.

markusw

Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @02:20PM (#45337413)
I am so tempted to benchmark some more… :D Would be great to get some numbers on this, super interesting.
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @02:19PM (#45337406)
Note: The last paragraph was about in production, not tests. :-)
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @02:18PM (#45337389)
Uuuuh, that looks super interesting! I hadn't heard of that. Thank you for sharing!
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @02:16PM (#45337362)
Yeah, basically the same here, except it's Caddy in front instead of Traefik.

So you do periodic backups, not incremental on every write or something (read replica-like)?

It's important to me to not lose any data once committed if at all possible.

(For testing, I've sped everything up by running migrations on `template1` and every test gets a random database name. Works wonders.)

Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @02:12PM (#45337319)
Ah, I thought I recognized your username from a Github URL. :D Thank you for your contributions in the SQLite & Go space!
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @02:09PM (#45337281)
I had no idea that was possible. I'll keep that in mind if I need a similar workflow. DuckDB is awesome. :D
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @02:08PM (#45337264)
Oh, interesting! But that's more of a desktop application now, right? I was thinking of web servers when writing the article, but I can see how that's not totally clear. :-)
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @02:07PM (#45337256)
Yeah, totally agreed. I'll have to look into that. I've really enjoyed the stability of SQLite, down to the file format.
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @02:06PM (#45337243)
The biggest one is latency. Network latency will almost always be orders of magnitude bigger than I/O latency. There's a whole class of problems that goes away when latency becomes very small.
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @01:34PM (#45336800)
Interesting! I'm going to look into that. :-) Thank you for sharing.
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @01:33PM (#45336784)
While I really like DuckDB, I wouldn't use it for OLTP workloads.

I'm curious, when do you want to treat your Postgres like SQLite? :-) That's basically the opposite of what I was thinking of in the article.

Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @01:31PM (#45336762)
On the other hand, and especially if migrating from SQLite, there's typically not _that_ much data. Even hundreds of GBs would probably be okay? Drives are so fast these days. Would be interesting to benchmark.
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @01:30PM (#45336741)
Yeah, that really is a great thing about SQLite.

I wonder whether packaging everything in Docker (including a specific Postgres container identified by hash or whatever) and deploying on the same architecture would solve this?

Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @01:28PM (#45336714)
Hehe. Yes and no.

In the cloud, as you probably know, the usual way now is to spin up Postgres separately (RDS, Supabase, Planetscale, Crunchy Bridge, you name it). We've gotten so used to it that a different way of doing it is often not even considered.

But I think tooling has come a long way, and there have been a lot of learnings from the cloud, so it's time to swing the pendulum back and reconsider assumptions!

Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @01:25PM (#45336672)
Indeed pondering! The dude here. I think writing a little piece like that often sparks some interesting discussions here and elsewhere. :-)
Re:What if we treated Postgres like SQLite? on Monday September 22, 2025 @12:24PM (#45335673)
It's also used plenty in the cloud, for a variety of reasons. Check out the first linked article for something I wrote on that: https://www.maragu.dev/blog/go-and-sqlite-in-the-cloud
Re:Use One Big Server (2022) on Tuesday September 02, 2025 @01:28AM (#45099428)
You can easily do consistent backup on live databases. There’s a backup command and API.
Re:Show HN: Base, an SQLite database editor for macOS on Monday August 25, 2025 @04:29PM (#45018614)
Thank you for answering. That's fair re. App Store rules. Feature flags FTW? :D

I was happy to see that FTS5 was always enabled as a compile-time option.

Re:Show HN: Base, an SQLite database editor for macOS on Monday August 25, 2025 @11:19AM (#45014822)
I've just tried it out, looks nice!

I've been using TablePlus a lot, but there are some SQLite-specific features I'd really like to have in an app:

- Foreign keys enabled by default, so I don't have to remember to enable that in every session.

- Support for loading extensions automatically. I'm using sqlite-vec for example. Right now, browsing virtual tables for that just doesn't show that much, and executing a query just results in "no such module: vec0"

I'll keep an eye on the project. :-)

Beautifully done, thank you for sharing. :-)
Re:Litestream: Revamped on Wednesday May 21, 2025 @01:37PM (#44053970)
I wrote about this back in 2022, still applicable today: https://www.golang.dk/articles/benchmarking-sqlite-performan...
Re:Stimulation Clicker on Monday January 06, 2025 @03:40PM (#42615490)
My pulse is still higher than usual. We just spent an hour on this. This is an art game. :D Thank you!
You’re missing MIDI controllers, of which there are plenty. :) Synth versions without the keys are often called “desktop versions”.
Re:Choose Boring Technology and LLMs on Thursday November 14, 2024 @02:30PM (#42140168)
I build my frontends with HTML using gomponents. The jury’s still out about how far I can get with just Go while incorporating LLMs into my apps, but I’m optimistic!
Re:Choose Boring Technology and LLMs on Thursday November 14, 2024 @08:30AM (#42135978)
Yep! "Boring tech" has basically become an established term at this point, I'm not going to change that.
Re:Choose Boring Technology and LLMs on Thursday November 14, 2024 @08:28AM (#42135970)
It's okay, sometimes the discussions turn interesting and I learn something. And a lot of people get to read my article, and I hope their lives are enriched in a small but meaningful way.

I'm glad the approach works for you as well! :D It's fascinating to watch a statistical document completion model be able to do so much.

Re:Choose Boring Technology and LLMs on Thursday November 14, 2024 @08:25AM (#42135934)
I do!

In the article, I mostly mean working with LLMs inside the applications I'm building, as opposed to as a tool as part of development. But I do both.

Right now, I'm trying out Zed, which supports multiple LLMs natively. Just today, I tried Zed + Ollama + Qwen 2.5 Coder 32B running locally, and it worked! Blows my mind that I can have GPT-4o-level assistance running on my laptop. :D

Older »