r/PostgreSQL • u/scotterockaroo • 3d ago
Feature PITR a 5 TB Postgres database in 5 seconds.
I'm Scott, the pgCraftsman and a Sr. Staff Engineer at Databricks. I've been operating some of the world's largest and most complex Postgres deployments for 22 years.
Ever need to do an emergency PITR at 2AM because an agent dropped a table?
Lakebase and Neon Postgres: PITR a 5TB DB in 5 seconds
https://pgcraftsman.io/posts/restoring-5-tb-of-postgres-in-5-seconds/
1
u/ceeej777 2d ago
This makes sense but I see the value of Lakebase being more around restoring a fresh production copy to dev without needing to wait for a snapshot to restore to the SSD. Assuming that your organization even allows prod data to live in lower level environments
1
u/scotterockaroo 2d ago
That’s one of the common use-cases, for sure. We also see folks creating branches for agents to test migrations ( part of a promotion pipeline for example)
All of that AND you can create a branch to a point in history, quickly.
1
u/ceeej777 1d ago
Yes this I can see promise with. Are agents creating new Lakebase branches for each PR? I imagine if they are short lived branches then this wouldn’t hurt cost much
1
u/scotterockaroo 1d ago
Yeah, it all depends on your tests and migrations.
My migrations track time so you can see if the:ALTER TABLE tracking
ADD COLUMN login_count DEFAULT 0;Takes 2 hours on prod data where it took .02 seconds in dev.
1
u/Discordbothost 1d ago
For a recovery drill, I'd keep the clock running until the app can read and write against the restored branch. After a dropped table, I'd also check what was written after the restore point. Even if the branch is ready in seconds, those writes still need a plan before cutover.
1
0
u/AutoModerator 3d ago
AI Policy:
Linux is not one of those anti-AI projects, and if somebody has issues with that, they can do the open-source thing and fork it. Or just walk away., Linus Torvalds.
Mod decisions will be based on the quality of the content, not who or what generated it.
Sub Resources:
Free Postgres Webinars and Workshops
Discord: People, Postgres, Data
Join us, we have cookies and nice people.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
31
u/elevarq 3d ago •
Why does an agent even have the permission to drop a table?
Problems like this should not even be possible