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

Digital Signal Processing Pioneer Bede Liu Dies at 91

https://spectrum.ieee.org/digital-signal-processing
1•Jimmc414•1m ago•0 comments

Why AI agents need verified identity

https://chrisbergeron.com/2026/08/11/why_ai_agents_need_verified_identity/
1•speckx•2m ago•0 comments

The Wow signal was a strong narrowband radio signal detected on August 15, 1977

https://en.wikipedia.org/wiki/Wow!_signal
2•firefax•4m ago•0 comments

Show HN: Live Claude Usage HUD for a $38 Thermalright Trofeo Vision LCD

https://github.com/christensen143/claude-trofeo-hud
2•christensen143•4m ago•0 comments

Tracking down a Zsh history data loss bug

https://michael.stapelberg.ch/posts/2026-08-09-zsh-history-truncation-bug/
2•ingve•7m ago•0 comments

Book Review: The Escape Artist

https://www.astralcodexten.com/p/your-book-review-the-escape-artist
1•paulpauper•8m ago•0 comments

No-New-Physics Consciousness

https://www.overcomingbias.com/p/no-new-physics-consciousness
3•paulpauper•9m ago•0 comments

2026 Filing Season: Preliminary Observations on IRS Performance

https://www.gao.gov/products/gao-26-109074
1•Jimmc414•10m ago•0 comments

Tyler Cowen: A Conservative Case for Liberal Immigration

https://www.thefp.com/p/tyler-cowen-conservative-case-liberal-immigration-policy
2•paulpauper•11m ago•0 comments

I wrote OSS for fun. They called it Exceptional Talent

https://ryoppippi.com/blog/2026-08-15-uk-gtv-en/
1•ryoppippi•12m ago•1 comments

U.S. Urges Apple Not to Buy Chinese Memory Chips

https://www.wsj.com/tech/apple-china-memory-chip-plan-57773a83
4•bookofjoe•18m ago•3 comments

How to Confuse Some SSH Bots

https://nochan.net/b/Internet-Crap/20260108-Confuse-Some-SSH-Bots/
1•Bender•18m ago•0 comments

The AI Slop Backlash Is Having an Impact

https://www.wired.com/story/the-ai-slop-backlash-is-actually-having-an-impact/
2•herbertl•19m ago•0 comments

Show HN: TokenLab MCP, model discovery, pricing, and native AI endpoint tools

https://tokenlab.sh/zh/mcp
2•tokenlabai•20m ago•0 comments

Agentic Development Fallacies

https://thuva4.com/blog/agentic-development-fallacies/
3•thuva4•20m ago•0 comments

Augmenting Long-term Memory (2018)

https://augmentingcognition.com/ltm.html
3•re-framer•24m ago•0 comments

AI makes foundational knowledge more important

https://www.timeshighereducation.com/opinion/ai-makes-foundational-knowledge-more-important-ever
3•jruohonen•28m ago•0 comments

Hayward City Council will consider banning data centers at its Sept. 15 meeting

https://www.hayward-ca.gov/discover/news/aug26/hayward-council-consider-move-ban-data-centers-its...
4•MilnerRoute•28m ago•1 comments

Why did I build a product no one needs?

https://metedata.substack.com/p/017-why-did-i-build-a-product-no
2•young_mete•29m ago•0 comments

DersCountsort: General-purpose sort with amortized O(N) complexity

2•dersoverflow•30m ago•0 comments

Which Data Repository Should You Use?

http://daniellakens.blogspot.com/2026/08/which-data-repository-should-you-use.html
2•pajop•30m ago•1 comments

Abdominal Fat Predicts Heart Disease Risk Better Than BMI

https://www.acc.org/about-acc/press-releases/2026/08/11/14/59/abdominal-fat-predicts-heart-diseas...
2•theanonymousone•32m ago•0 comments

AAP: How pediatricians are navigating federal leaders' fearmongering on vaccines

https://www.statnews.com/2026/08/14/vaccine-executive-order-policy-aap-president/
2•EA-3167•33m ago•0 comments

4B Capable Agent in the Browser

https://alexwortega-my-pi-agent.hf.space/
2•Alexwortega•34m ago•0 comments

Living with Depression: The Part I Never Say Out Loud About Depression

https://medium.com/freedomofthought/living-with-depression-the-part-i-never-say-out-loud-3e9c218b...
1•raynchad•34m ago•1 comments

A Walkable ASCII Cyberpunk City in One HTML File [video]

https://www.youtube.com/watch?v=3YtygAx_C6A
1•yboris•34m ago•0 comments

Memories Mysteriously Survive After Brain Shutdown

https://www.404media.co/memories-mysteriously-survive-after-brain-shutdown-and-scientists-dont-kn...
1•Jimmc414•35m ago•1 comments

Dryas: A Reprogrammable Engine for High-Speed Interconnect Tracing and Analysis

https://arxiv.org/abs/2608.12934
1•Jimmc414•35m ago•0 comments

Show HN: Personal Stock – share a stake in your lifetime wealth

https://github.com/onrootnet/personal-stock
1•koopuluri•36m ago•0 comments

The Enshittification of Everything (Part 3)

https://robertreich.substack.com/p/the-enshittification-of-everything-c94
11•rbanffy•37m ago•1 comments