Skip to content

Comment on What if database branching was easy?parent

Comments

You don’t need anything but vanilla pg and a supported file system to do it anymore; just clone the database using a template and a newish version of Postgres.

Are you referring to `file_copy_method = clone` from Postgres 18? For example: https://boringsql.com/posts/instant-database-clones/

I think the key limitation is:

The source database can't have any active connections during cloning. This is a PostgreSQL limitation, not a filesystem one.

Yeah, that's the one. My use case is largely for local development, so the active connections thing isn't a limiter for me.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.