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

Mainsprings, watermarks, answer boxes and other bad words for good ideas

https://www.arjunkirtipatel.com/blog/mainsprings-watermarks-answer-boxes-and-other-bad-words-for-...
1•arjunkpatel•1m ago•0 comments

Apple May Return to Server Market with Nvidia Technology

https://www.macrumors.com/2026/09/16/apple-may-return-to-server-market/
2•tosh•3m ago•0 comments

Show HN: A Stateful LLM API that works across providers

https://twigg.ai
1•mdebeer•4m ago•0 comments

Show HN: Plant watering system with Arduino Nano

https://sam-burns.com/posts/automatic-plant-watering-system/
1•sam-bee•4m ago•1 comments

Problem Notation and Testing

https://ciju.in/writings/on-problem-notation-and-testing
1•ciju•4m ago•0 comments

Bamzooki

https://en.wikipedia.org/wiki/Bamzooki
1•talkinghead•5m ago•0 comments

OpenAI Expands ChatGPT Ads with Sponsored Agents

https://openai.com/index/reimagining-advertising-with-ai/
1•vertigoruntime•6m ago•0 comments

/pyor:review – Claude skill for human code review

https://github.com/pyor-review/pyor-cli
1•othmanosx•9m ago•0 comments

Valve plans to get Steam games working on compatibility-challenged ARM PCs

https://www.rockpapershotgun.com/were-trying-to-make-it-easier-valve-confirm-the-steam-frame-is-j...
2•HelloUsername•10m ago•0 comments

We're catalyzing megaton-scale climate impact in Brazil

https://blog.google/company-news/outreach-and-initiatives/sustainability/terradot-superpollutants...
1•geox•12m ago•0 comments

AI research institute founded by Yoshua Bengio vandalized in Montreal

https://www.cbc.ca/news/canada/montreal/mila-vandalism-montreal-ai-summit-9.7345851
2•sm001•12m ago•1 comments

DeepMind Paper: Dream-RSI: Recursive Self-Improvement Through Evolving Worlds

https://arxiv.org/abs/2609.14858
2•bananaflag•13m ago•1 comments

I caught an LLM-powered recruiter with a prompt injection on LinkedIn

https://khancyr.github.io/blog/2026/03/15/how-i-caught-an-llm-powered-recruiter-with-a-prompt-inj...
1•bucket2015•15m ago•0 comments

Show HN: Skill to generate change preview pages

https://github.com/steveharrison/change-preview
1•steveharrison•16m ago•0 comments

Explaining the Proposed $103k H-1B Fee

https://ifp.org/explaining-the-proposed-103k-fee-on-h-1bs/
1•surprisetalk•17m ago•0 comments

AWS can't restore service to Bahrain, UAE facilities 6 months after Iran strikes

https://www.cnbc.com/2026/09/15/aws-cant-restore-service-to-bahrain-uae-6-months-after-iran-strik...
2•theanonymousone•17m ago•0 comments

Scientist Workbench: Scientific Compute for Agents

https://scientistworkbench.com/
1•hentrep•17m ago•0 comments

How to Buy a Tesla and Get FSD for Free

https://tynan.com/freefsd/
1•surprisetalk•17m ago•0 comments

WAIl (Blonging for Freedom)

https://blog.lx.oliva.nom.br/2026-09-14-wAIl.en.html
2•amcclure•22m ago•0 comments

The Climb Was the Safety Feature

https://cekrem.github.io/posts/the-climb-was-the-safety-feature/
3•theanonymousone•23m ago•0 comments

Using NetBSD's pkgsrc everywhere I can

https://www.rubenerd.au/using-netbsds-pkgsrc-everywhere-i-can/
1•Bluestein•23m ago•0 comments

Show HN: Who-GPU, a simple monitoring tool to view GPU usage across machines

https://github.com/lucafossen/who-gpu
1•smogblock•24m ago•0 comments

You're on the Real X Website and You're Still Being Scammed

https://brothke.medium.com/youre-on-the-real-x-website-and-you-re-still-being-scammed-ebd3fba9e344
3•benrothke•24m ago•0 comments

The American Age Is Over

https://www.theatlantic.com/ideas/2026/09/trump-iran-superpower-decline/688639/
7•cisc•25m ago•3 comments

Show HN: TeXposit – Feature rich LaTeX and Markdown editor

https://texposit.com
2•danielszabo•27m ago•0 comments

Goroutine Leak Profiles

https://go.dev/blog/goroutine-leak-profiles
1•torutofu•27m ago•0 comments

Starlink's Other Network

https://circleid.com/posts/starlinks-other-network
2•vinhnx•27m ago•0 comments

US gov't orders Kalshi halt AI compute price tracker over natl security concerns

https://www.semafor.com/article/09/15/2026/commerce-dept-ordered-kalshi-to-take-down-ai-compute-f...
2•CGMthrowaway•28m ago•0 comments

Building an open source AEC compliance checker that does not guess

https://www.luckmanqasim.com/blog/building-a-compliance-linter
1•luckmanqasim•28m ago•0 comments

Ask HN: Unipolar world with Washington DC as might and power center

1•roschdal•28m ago•1 comments