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

I Don't Write Code Anymore. I Have It Written

https://aydogan.dev/blog/i-dont-write-code-anymore/
1•aydgn•3m ago•0 comments

What different types of typographic scales exist?

https://cieden.com/book/sub-atomic/typography/different-type-scale-types
1•preetamjinka•5m ago•0 comments

The Screen Act Threatens Privacy Far Beyond Adult Websites

https://www.techdirt.com/2026/08/03/the-screen-act-threatens-privacy-far-beyond-adult-websites/
1•speckx•6m ago•0 comments

The Last Bug on Earth

https://www.minid.net/2026/8/3/the-last-bug-on-earth
1•meerita•7m ago•0 comments

Data Integration Without an Ontology

https://productnow.ai/blogs/ai-native-data-integration-without-an-ontology
1•kadhirvelm•9m ago•0 comments

Retiring the DALL·E GPT

https://help.openai.com/en/articles/6825453-chatgpt-release-notes#retiring-the-dalle-gpt
1•pentagrama•9m ago•0 comments

Forward Deployed Executives: The Next Billion-Dollar AI Unblock

https://www.rickmanelius.com/p/forward-deployed-executives-the-next
1•rickmanelius•9m ago•0 comments

DeepSeek-V4-Flash 2.98x faster on 4x B200, lossless

https://twitter.com/Akashi203/status/2084373935454400964
2•OsamaJaber•9m ago•0 comments

Minimax H3

https://huggingface.co/MiniMaxAI/MiniMax-H3
1•SpyCoder77•9m ago•0 comments

Token budget circuit breaker – cut multi-agent retry waste ~98%

https://github.com/mrblakessinger-rgb/paradox-engine-eots
1•Pachanoi•10m ago•0 comments

No New Name Has Replaced "UX"

https://www.nngroup.com/articles/no-new-name-ux/
2•pentagrama•11m ago•0 comments

Pawnshop Chain Serves the K-Shaped Economy

https://www.wsj.com/cfo-journal/from-200-loans-to-30-000-birkins-a-pawnshop-chain-serves-the-k-sh...
1•bookofjoe•11m ago•1 comments

Agents are users now, and they found every hole in our product

https://nextwaveoftech.com/posts/what-i-learned-building-an-agent-first-plugin
1•jameslaneyno9•12m ago•0 comments

Obligatory one month without social media on my phone Substack essay

https://www.late-review.com/p/obligatory-one-month-without-socia
3•devonnull•13m ago•0 comments

A Closed-Loop Consequence-Governance Runtime for AI Agents

https://zenodo.org/records/21778592
1•TealGrapes93•13m ago•0 comments

Are all these data centers a way to try to substitute for promised progress?

1•mapping365•14m ago•2 comments

Show HN: Simple mobile app to share your ID, not your identity

https://anonymizemyid.com
1•davidpelayo•14m ago•2 comments

Kubo v0.43.0 Released

https://github.com/ipfs/kubo/releases/tag/v0.43.0
1•xd1936•15m ago•0 comments

We are surprisingly close to prompt-to-model in computer vision

http://stefano.petrilli.xyz/prompt-to-model/
1•stefanopetrilli•17m ago•0 comments

'Financial Times' Issues 103-Year-Old Correction (2017)

https://www.npr.org/sections/thetwo-way/2017/08/08/542238978/-financial-times-issues-103-year-old...
2•downbad_•18m ago•0 comments

Russian spies turn public Wi-Fi into malware delivery systems

https://www.theregister.com/security/2026/08/03/russias-svr-borks-public-wi-fis-for-digital-surve...
1•JeremyPatMartin•18m ago•0 comments

Pentagon asks soldiers for 'creative' ideas to punish Iran

https://www.telegraph.co.uk/world-news/2026/08/03/pentagon-asks-soldiers-for-creative-ideas-to-pu...
1•prmph•20m ago•1 comments

History of Backwards Compatibility

https://huguesjohnson.com/features/backwards/
1•speckx•20m ago•0 comments

now-playing.el, an Emacs interface to the macOS Music app

http://yummymelon.com/devnull/announcing-now-playing-el.html
1•kickingvegas•21m ago•0 comments

Fable Denies Hacking Intrusion Response

https://twitter.com/greghunkins/status/2084372241169453389
1•hunkins•24m ago•0 comments

The college earnings gap isn't one number

https://blog.waldrn.com/p/the-college-earnings-gap-isnt-one
1•gmays•26m ago•0 comments

Israeli court halts Ben Gvir's crocodile prison plan over animal rights

https://www.dailysabah.com/world/mid-east/israeli-court-halts-ben-gvirs-crocodile-prison-plan-ove...
2•vrganj•26m ago•0 comments

Show HN: Mirall – Secure large (terabyte) file transfer. No cloud. No middleman

https://github.com/ok/mirall-app
2•gokohl•28m ago•0 comments

Has the Bitcoin Moved?

https://hasthebitcoinmoved.com/
4•distalx•29m ago•0 comments

Why it's impossible to get relevant news on Google News

https://elgan.com/why-its-impossible-to-get-relevant-news-on-google-news
1•mikelgan•30m ago•2 comments