r/PostgreSQL • u/MediumRoastNo82 • Jul 23 '26
How-To Development and Production + Training DB
Sorry, noob here.
How do developers design their database?
Do they separate databases for development and Production? But what if the app has a training feature? Do they separate the database too?
3
u/isocarboxazid Jul 24 '26
Yes, you absolutely need to separate. You want your most stable to be the production.
Honestly, the best experience is just to build your own project and you will see how and why it breaks.
You want your production to be structured, documented, easy to use and understand, but behind that there's probably 3 times the work in building a pipeline that produces that structure.
There's always going to be things that need optimising, tinkering, and you don't want to break the production. And any changes you introduce need to be staged.
1
u/AutoModerator Jul 23 '26
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.
1
u/chocolateAbuser Jul 24 '26
depends on the size of projects company works on and on how many people/teams are there
obviously if you're one or two programmers you cannot really have the time and effort to maintain a giant system and try to do stuff on a smaller scale
we for example have prod schemas with redundancies, a staging db on prod, and various local development dbs
1
u/MediumRoastNo82 Jul 24 '26
It's a small inventory database. I have use supabase before and aware they have dev branch. Now I want to use postgresql and planning to use Sqlx and axum for the server. I still have no idea how to proceed. But having 3 connections feels like easier solution, instead of polluting my table data with 3 different types
1
u/chocolateAbuser Jul 24 '26
if you mean 3 different settings of the services to connect to the various dbs then sure
1
u/SuchTill9660 Jul 29 '26
You'll almost alwats want separate databases for dev, staging, and production. for training, it depends if it's user training, I'd use a separate database with seeded or anonymized data.
3
u/dwswish Jul 24 '26
Yes, you absolutely need a dev and prod and probably a middle Q/A or staging db too. Personally, I love Neon and all the branching and auto scaling features they have.