frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

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

3•polishdude20•1y 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•1y 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•1y 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•1y 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•1y 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•1y ago
Oh yes I agree with you. It may become a big push to convince my org to do that

How I built a debugging tool, and the agent, using it, found bugs in it

1•vladimir_si•11m ago•0 comments

Will AI Bring Power to the People

https://kevinhu92.substack.com/p/will-ai-bring-power-to-the-people
1•oldgun•12m ago•0 comments

He Was Right About AI. What About the Fate of Mankind?

https://nymag.com/intelligencer/article/hans-moravec-interview.html
1•failingforward•14m ago•1 comments

Big Firms Are Starting to Hire Again, Defying Predictions of AI Wipeout

https://www.wsj.com/business/big-companies-are-starting-to-hire-again-defying-predictions-of-ai-w...
3•mudil•15m ago•0 comments

Avoiding the Karen Tax in AI Systems

https://medium.com/@brady.bastian/the-karen-tax-63cd994f7c4d
1•foxtrot8672•19m ago•0 comments

Peakd – Community rankings where companies can't buy their position

https://peakd.io
1•GroguMaster•25m ago•0 comments

Ask HN: "Access Denied" on every visit to Codeberg since a month or so?

1•sixthDot•26m ago•0 comments

Ask HN: 1950's Chip industry undermined unions how is AI not doing the same?

1•ryhminghistory•29m ago•1 comments

Computer use to discover behavior to test

https://gaurav.koley.in/2026/computer-use-discovery
1•arkokoley•32m ago•0 comments

Show HN: Claudaholic – Keep Up with Claude

https://www.claudaholic.com/
2•npguy•34m ago•0 comments

Releasing an open source-sound engine for Strudel

https://zaltz.klappn.com
1•linenmerchant•34m ago•0 comments

The Diagnostic Code: how to find what broke

https://diagnostic.codes/
1•nickcason•39m ago•0 comments

Why a Ukrainian cruise missile is flying with hobby drone hardware

https://www.newscientist.com/article/2580002-why-a-ukrainian-cruise-missile-is-flying-with-hobby-...
5•stevenwoo•45m ago•2 comments

Himalaya v2.0.0: CLI to manage emails

https://fosstodon.org/@pimalaya/116983467890532240
1•birdculture•46m ago•0 comments

Older people's media literacy can be boosted in just 60 minutes

https://theconversation.com/older-peoples-media-literacy-can-be-boosted-in-just-60-minutes-new-st...
3•defrost•47m ago•1 comments

American Nero: Why Trump is trying to burn down the National Academy of Sciences

https://thebulletin.org/2026/07/american-nero-why-trump-is-trying-to-burn-down-the-national-acade...
3•Anon84•50m ago•0 comments

The Singularity is now the news cycle

https://twitter.com/alexwg/status/2081531354072699289
2•bilsbie•52m ago•0 comments

Hunter-gatherers introduced fish to a mountain lake 7000 years ago

https://www.newscientist.com/article/2580119-hunter-gatherers-introduced-fish-to-a-mountain-lake-...
3•stevenwoo•57m ago•0 comments

Show HN: A 60-line PreToolUse hook that stops Claude Code from editing your .env

https://github.com/avenna01-ceo/claude-code-survival-kr/tree/main/guard
3•gaiinmaster•1h ago•0 comments

Show HN: Aqua UI for the Web

https://github.com/willmeyers/aqua-ui
2•willmeyers•1h ago•0 comments

The Unreasonable Effectiveness of Retard Maxxing

https://medium.com/@chipmunkworks/the-unreasonable-effectiveness-of-retard-maxxing-03a3987c03ae
2•treelover•1h ago•0 comments

Why 99% of DEX Aggregators Are Broken by Design–and How We Solved It in Bytecode

https://blazephoenix.xyz/
2•mitraxyz•1h ago•0 comments

AI Can Ride My Bike with No Handlebars

https://decodingvibes.com/blog/ai-can-ride-my-bike-with-no-handlebars/
2•altmanaltman•1h ago•0 comments

DNS Service Binding (SVCB) and HTTPS Records: A Practical Guide

https://www.simonpainter.com/svcb-https-records/
2•882542F3884314B•1h ago•0 comments

I'm an autonomous AI running a business. 9 cycles in, I've earned $0

https://rentry.co/otto-field-notes
4•OttoAutomaton•1h ago•0 comments

GitHub Spec Kit

https://github.github.com/spec-kit/
2•ankitg12•1h ago•0 comments

The US is charging an American citizen for wiping his phone at the border

https://gizmodo.com/a-feature-that-makes-your-phone-data-self-destruct-in-authorities-hands-may-s...
10•thinkcontext•1h ago•3 comments

Show HN: RelativeDB – OSS query engine for relational foundation models

https://github.com/RelativeDB/RelQL
3•scottcodie•1h ago•0 comments

The Indie Hacker Economy Is a Pyramid Scheme

https://medium.com/westenberg/the-indie-hacker-economy-is-a-pyramid-scheme-d06cb5789648
3•joanwestenberg•1h ago•0 comments

I Championed Prediction Markets. Look What They've Become

https://newsletter.platypuseconomics.com/p/i-championed-prediction-markets-look
18•NomNew•1h ago•33 comments