Live data from Hacker News

Instant database clones with PostgreSQL 18

boringsql.com

61–70 of 168 posts

Re: Instant database clones with PostgreSQL 18

#62

As an aside, I just jumped around and read a few articles. This entire blog looks excellent. I’m going to have to spend some time reading it. I didn’t know about Postgres’s range types.

Range types are a godsend when you need to calculate things like overlapping or intersecting time/date ranges.

Re: Instant database clones with PostgreSQL 18

#63

In theory, a database that uses immutable data structures (the hash array mapped trie popularized by Clojure) could allow instant clones on any filesystem, not just ZFS/XFS, and allow instant clones of any subset of the data, not just the entire db. I say "in theory" but I actually built this already so it's not just a theory. I never understood why there aren't more HAMT based databases.

Does datomic have built in cloning functionality? I’ve been wanting to try datomic out but haven’t felt like putting in the work to make a real app lol

Surprisingly, no it does not. Datomic has a more limited feature that lets you make an in-memory clone of the latest copy of the db for speculative writes, which might be useful for tests, but you can't take an arbitrary version of the db with as-of and use it as the basis for a new version on disk. See: https://blog.danieljanus.pl/2025/04/22/datomic-forking-the-p...

There's nothing technically that should prevent this if they are using HAMTs underneath, so I'm guessing they just didn't care about the feature. With HAMT, cloning any part of the data structure, no matter how nested, is just a pointer copy. This is more useful than you'd think but hardly any database makes it possible.

Re: Instant database clones with PostgreSQL 18

#64

Is anyone aware of something like this for MariaDB? Something we've been trying to solve for a long time is having instant DB resets between acceptance tests (in CI or locally) back to our known fixture state, but right now it takes decently long (like half a second to a couple seconds, I haven't benchmarked it in a while) and that's by far the slowest thing in our tests. I just want fast snapshotted resets/rewinds t…

I was able to accomplish this by doing each test within its own transaction session that gets rolled-back after each test. This way I'm allowed to modify the database to suit my needs for each test, then it gets magically reset back to its known state for the next test. Transaction rollbacks are very quick.

Re: Instant database clones with PostgreSQL 18

#65

Earlier quoted context omitted.

You mean you told Claude a bunch of details and it built it for you? Mind you, I'm not saying it's bad per se. But shouldn't we be open and honest about this? I wonder if this is the new normal. Somebody says "I built Xyz" but then you realize it's vibe coded.

Let's say there is an architect and he also owns a construction company. This architect, then designs a building and gets it built from of his employees and contractors. In such cases the person says, I have built this building. People who found companies, say they have built companies. It's commonly accepted in our society. So even if Claude built for it for GP, as long as GP designed it, paid for tools (Claude) to…

That's a lot of ifs.

Re: Instant database clones with PostgreSQL 18

#66
post #55

Earlier quoted context omitted.

You mean you told Claude a bunch of details and it built it for you? Mind you, I'm not saying it's bad per se. But shouldn't we be open and honest about this? I wonder if this is the new normal. Somebody says "I built Xyz" but then you realize it's vibe coded.

There was a recent wave of such comment on the rust subreddit - exactly in this shape "Oh you mean you built this with AI". This is highly toxic, lead to no discussion, and is literally drove by some dark thought from the commentator. I really hope HN will not jump on this bandwagon and will focus instead on creating cool stuff. Everybody in the industry is vibecoding right now - the things that stick are due to suff…

>This is highly toxic, lead to no discussion

Why good faith is a requirement for commenting but not for submissions? I would argue the good faith assumption should be disproportionately more important for submissions given the 1 to many relationship. You're not lying, it indeed is toxic and rapidly spreading. I'm glad this is the case.

Most came here for the discussion and enlightenment to be bombarded by heavily biased, low effort marketing bullshit. Presenting something that has no value to anyone besides the builder is the opposite of good faith. This submissions bury and neglect useful discussion, difficult to claim they are harmless and just not useful.

Not everyone in the industry is vibe coding, that is simply not true. but that's not the point I want to make. You don't need to be defensive about your generative tools usage, it is ok to use whatever, nobody cares. Just be ready to maintain your position and defend your ideals. Nothing is more frustrating then giving honest attention to a problem, considering someone else perspective, to just then realize it was just words words words spewed by slop machine. Nobody would give a second thought if that was disclosed. You are responsible for your craft. The moment you delegate that responsibility into the thrash you belong. If the slop machine is so great, why in hell would I need you to ask it to help me? Nonsensical.

Re: Instant database clones with PostgreSQL 18

#67

Earlier quoted context omitted.

You mean you told Claude a bunch of details and it built it for you? Mind you, I'm not saying it's bad per se. But shouldn't we be open and honest about this? I wonder if this is the new normal. Somebody says "I built Xyz" but then you realize it's vibe coded.

Let's say there is an architect and he also owns a construction company. This architect, then designs a building and gets it built from of his employees and contractors. In such cases the person says, I have built this building. People who found companies, say they have built companies. It's commonly accepted in our society. So even if Claude built for it for GP, as long as GP designed it, paid for tools (Claude) to…

Asking someone to build a house - and then saying I built it - is "very misleading" to put it nicely.

When you order a website on upwork - you didn't build it. You bought it.

Re: Instant database clones with PostgreSQL 18

#68
post #35

Earlier quoted context omitted.

It's being downvoted because the commenter is asking for something that is already in the readme. Furthermore, it's ironic that the person raising such an issue is performing the same mistake as they are calling out - neglecting to read something they didn't write.

It‘s at the very bottom of the readme, below the MIT license mention. Yes, it’s there, but very much in the fineprint. I think the easier thing to spot is the CLAUDE.md in the code (and in particular how comprehensive it is). Again, I love Claude, I use it a ton, but a topic like database cloning requires a certain rigour in my opinion. This repo does not seem to have it. If I had hired a consultant to build a tool l…

>Yes, it’s there, but very much in the fineprint.

This is where it belongs, at best. He doesn't even have to disclose it. Prompting so that the ai writes the code faster than you is okay.

Re: Instant database clones with PostgreSQL 18

#69

Earlier quoted context omitted.

You mean you told Claude a bunch of details and it built it for you? Mind you, I'm not saying it's bad per se. But shouldn't we be open and honest about this? I wonder if this is the new normal. Somebody says "I built Xyz" but then you realize it's vibe coded.

Let's say there is an architect and he also owns a construction company. This architect, then designs a building and gets it built from of his employees and contractors. In such cases the person says, I have built this building. People who found companies, say they have built companies. It's commonly accepted in our society. So even if Claude built for it for GP, as long as GP designed it, paid for tools (Claude) to…

Every single commit is Claude. No human expert involved. Would you trust your company database to an 25 dollars vibe session? Would you live in a 5 dollars building? Is there any difference from hand tailored suit, constructed to your measurements, and a 5 dollars t-shirt? Some people don't want to live in a five dollars world.

Re: Instant database clones with PostgreSQL 18

#70
post #17

For those who can't wait for PG18 or need full instance isolation: I built Velo, which does instant branching using ZFS snapshots instead of reflinks. Works with any PG version today. Each branch is a fully isolated PostgreSQL container with its own port. ~2-5 seconds for a 100GB database. https://github.com/elitan/velo Main difference from PG18's approach: you get complete server isolation (useful for testing migrat…

Despite all of the complaints in other comments about the use of Claude Code, it looks interesting and I appreciated the video demo you put on the GitHub page.
Post reply on HN