frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Any good tools to pgdump multi tenant database?

3•polishdude20•7mo ago
Just joined a new company and they run a multi tenant database in postgres where each tenant is distinguished by their account ID. I'd like to be able to dump the data of a single account to my local instance to assist in debugging.

Problem is, many of the entities do not include an account ID. For example, a user can have an account ID but a user post will not but it will be tied to a user ID.

Also foreign keys aren't really implemented fully.

Are there any tools or techniques that could help make this process easier to do?

Comments

tudorg•7mo ago
You can try with data subsetting tools, a few that I know are: greenmask, jailer, tonic condenser, and I think there are more. They are not exactly for your use case, but might help you a bit. The problem is most of these tools can walk foreign keys, but only in one directions.

Also, since you said FK are not fully implemented, then there just won't be enough information for them to work with. So you can either work on fixing the foreign keys or have more complex scripts.

polishdude20•7mo ago
Thanks for the suggestions!

Yeah due to the unavailability of FK's, I'd have to somehow map certain ID columns to the tables they're for, accounting for slight naming convention differences.

woyten•7mo ago
In case you don’t have FKs you could specify virtual foreign keys in Greenmask.

Check out docs for details

https://docs.greenmask.io/latest/database_subset/#virtual-re...

abhisek•7mo ago
This is poor design. Multi-tenant data model design must have a tenant or segment ID for every tenant segmented tables. While it may not be a problem initially but as the business grows, you may need to move tenant data to separate DBs or even different regions based on compliance requirements. IMHO it is a good idea to run DB migrations and have a tenant ID populated in all tenant segmented tables
polishdude20•7mo ago
Oh yes I agree with you. It may become a big push to convince my org to do that

How the Mad Men Lost the Plot Again

https://www.ian-leslie.com/p/how-the-mad-men-lost-the-plot-again
1•dotcoma•1m ago•0 comments

NASA Tracking Plane-Sized Asteroid Approaching Earth

https://www.newsweek.com/nasa-tracking-plane-sized-asteroid-approaching-earth-3-11278882
1•leopoldj•1m ago•0 comments

My Flights Are in the Epstein Files

https://jkbjournalist.substack.com/p/my-flights-are-in-the-epstein-files
1•d3rockk•2m ago•0 comments

Nvidia closes $5B stake in Intel, filing shows

https://coinheadlines.com/news/nvidia-closes-5-billion-stake-in-intel-filing-shows/article-24243/
1•Johann-Wilfred•2m ago•0 comments

Agnelli family rejects Tether's 1B euro offer

https://coinheadlines.com/news/agnelli-family-rejects-tethers-1-2-billion-offer-to-acquire-majori...
1•Johann-Wilfred•4m ago•0 comments

Exploiting Silent Delivery Receipts to Monitor Users on WhatsApp/Signal

https://github.com/gommzystudio/device-activity-tracker
1•krick•4m ago•0 comments

Musk, Bezos, and Zuckerberg Are Full of Shit (Literally) in New Art Exhibit

https://gizmodo.com/musk-bezos-and-zuckerberg-are-full-of-shit-literally-in-new-art-exhibit-20006...
1•gnabgib•5m ago•0 comments

The Worst Thing About Elon Musk Is That He Got Away with All of It

https://newrepublic.com/article/204558/elon-musk-monster-2025-doge
3•robtherobber•6m ago•1 comments

Show HN: Package Manager for Agent Skills: Publish, Discover, Install Everywhere

https://paks.stakpak.dev
3•kajogo•7m ago•0 comments

The Compromises of Free Software

https://micahblachman.beehiiv.com/p/the-compromises-of-free-software
1•subdomain•8m ago•1 comments

The tyranny of friendship: Let your friends set your goals

https://friend.backend.how
2•pg_law•8m ago•3 comments

The Precious Eyeblink

https://tidyfirst.substack.com/p/the-precious-eyeblink
1•zdw•9m ago•0 comments

Ask HN: What B2B SSO solution are you using and do you like it?

1•scottndecker•10m ago•0 comments

My 9-Year-Old Built His Own Gaming PC

https://h3manth.com/scribe/9-year-old-builds-gaming-pc/
2•init0•10m ago•0 comments

Freedom from Incompetence

https://lemire.me/blog/2025/12/29/freedom-from-incompetence/
1•zdw•10m ago•0 comments

Social networks affect redistribution decisions and polarization

https://academic.oup.com/pnasnexus/article/4/11/pgaf339/8340223?login=false
1•PaulHoule•11m ago•0 comments

Big Tech basically took Trump's unpredictable trade war lying down

https://arstechnica.com/tech-policy/2025/12/big-tech-basically-took-trumps-unpredictable-trade-wa...
3•danaris•13m ago•0 comments

This Year's Abel Prize Was Awarded to Professor Masaki Kashiwara

https://twitter.com/abel_prize/status/2005639950906319353
1•tzury•14m ago•0 comments

From Fake Heiress to Fugitive

https://www.nbcnews.com/news/us-news/fake-heiress-fugitive-former-employees-detail-alleged-long-c...
1•RickJWagner•14m ago•0 comments

The Time I Had to Sue Air France

https://sudo.foo/posts/2024/06/18/the-time-i-had-to-sue-air-france.html
1•BaloneyGeek•14m ago•0 comments

Rich Hickey's opening remarks from Clojure/Conj 2025 [video]

https://www.youtube.com/watch?v=MLDwbhuNvZo
1•puredanger•14m ago•0 comments

Is Reality Under a New Management?

https://helenofdestroy.substack.com/p/is-reality-under-new-management
2•yubblegum•14m ago•0 comments

Free Native Mobile App Template for WordPress

https://thebbapp.com/
1•thebbapp•15m ago•1 comments

Show HN: How about some meditation in gaming?

https://store.steampowered.com/app/4156740/Bluegrass_Mindfulness_Simulator_Demo/
1•madsterO•16m ago•0 comments

Reality Is Evil

https://aeon.co/essays/philosophers-must-reckon-with-the-meaning-of-thermodynamics
2•Brajeshwar•17m ago•0 comments

Show HN: MiddleViewer – A native macOS app for technical interview feedbacks

https://middleviewer.in
2•madhav_gaba•17m ago•0 comments

US Confirms Strike on 'Big Facility' Inside Venezuela

https://www.bloomberg.com/news/articles/2025-12-29/trump-claims-us-strike-on-big-facility-inside-...
2•belter•18m ago•1 comments

Do Bison Understand Death? Bison Funerals Suggest They Might

https://cowboystatedaily.com/2025/07/19/do-bison-understand-death-bison-funerals-suggest-they-might/
2•ilamont•18m ago•0 comments

Show HN: Agent37 – Monetize your Claude skills with shareable links

https://www.agent37.com/
1•vishnukool•18m ago•0 comments

Meta's internal solution to its AI needs: Google it

https://sf.gazetteer.co/metas-internal-solution-to-its-ai-needs-google-it
1•randycupertino•19m ago•0 comments