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

Codeberg Is Down

https://social.anoxinon.de/@codebergstatus/116824443563698727
1•sscaryterry•2m ago•0 comments

DOE explains antimatter

https://www.energy.gov/science/doe-explainsantimatter
1•hhs•3m ago•0 comments

We almost had a smartphone in the 90s. Why did it fail?

https://www.npr.org/2026/06/26/nx-s1-5872785/general-magic-sony-magiclink-constraints
2•hackernj•4m ago•1 comments

New Work, new technologies, and the skill premium

https://www.nber.org/digest/202606/new-work-new-technologies-and-skill-premium
2•hhs•6m ago•0 comments

Teamwork: An unexpected strategy bacteria use to survive antibiotics

https://www.bcm.edu/news/teamwork-an-unexpected-strategy-bacteria-use-to-survive-antibiotics
2•hhs•10m ago•0 comments

The Weight-Loss Revolution People Didn't Want

https://greyenlightenment.com/2026/06/23/the-weight-loss-revolution-people-didnt-want/
2•paulpauper•16m ago•0 comments

Show HN: KV-psi, using Linux PSI to to trim an LLM KV cache

https://github.com/infiniteregrets/kv-psi
1•infiniteregrets•17m ago•0 comments

The psychology behind AI fueled delusions

https://www.wsj.com/tech/personal-tech/ai-chatbots-psychology-delusion-662a3663
1•Jimmc414•17m ago•1 comments

Show HN: Peek-CLI: let coding agents see your browser

https://github.com/puffinsoft/peek-cli
3•BeverlyHills001•17m ago•0 comments

Show HN: Sasso – pure-Rust SCSS compiler, byte-exact to current dart-sass

https://github.com/momiji-rs/sasso
1•linyiru•17m ago•0 comments

Walter S. Arnold–Sculptor/Stone Carver

https://stonecarver.com/
1•NaOH•19m ago•0 comments

Reserved THP Feature Proposed for Linux to Combine the Best of HugeTLB and THP

https://www.phoronix.com/news/Reserved-THP-Linux
1•Bender•27m ago•0 comments

How to Audit a Legacy Codebase in the First Week

https://piechowski.io/post/how-i-audit-a-legacy-rails-codebase/
1•howToTestFE•29m ago•0 comments

Graphify – Open-Source Knowledge Graph Skill for AI Coding Assistants

https://graphify.net/index.html#features
2•xy008areshsu•41m ago•0 comments

US Army used 35 drones and 100 lb of C4 to clear a breach

https://www.businessinsider.com/us-army-commander-used-drones-c4-packed-robots-clear-breach-2026-6
2•Lihh27•43m ago•0 comments

Set Up Your Own DoH Service

https://nochan.net/b/Internet-Crap/20260602-Set-Up-Your-Own-DoH-Service/
2•Bender•43m ago•0 comments

Show HN: I made a webcam motion detector, local/cloud storage, AI person detect

https://camera10.com/
1•pixeltwenty•44m ago•0 comments

Tesla settles lawsuit over fatal FSD pedestrian crash tied to 3.2M-vehicle probe

https://electrek.co/2026/06/26/tesla-fsd-pedestrian-death-settlement/
3•logickkk1•48m ago•0 comments

Old Computer Challenge

http://occ.sdf.org/
1•wrxd•49m ago•0 comments

Show HN: Vlt – A local vault for the API keys you use in every project

https://bwanaerp.medium.com/how-to-stop-losing-api-keys-forever-i-built-a-tool-for-this-8b2adfca782a
1•instarlaxy•51m ago•0 comments

The cost YAGNI was never about

https://newsletter.kentbeck.com/p/the-cost-yagni-was-never-about
2•mustaphah•53m ago•0 comments

Choosing a Public DNS Resolver

https://evilbit.de/dns-resolver-guide.html
1•pawal•57m ago•0 comments

Show HN: E3d-pod2vid – AI pipeline that turns podcasts into YouTube-ready videos

https://github.com/spacepacket1/e3d-pod2vid
2•spacepacket•59m ago•0 comments

Heimdall, a small open-source TUI to watch my homelab machines from one terminal

https://github.com/kinncj/Heimdall
3•kinncj•1h ago•0 comments

Why One of Tech's Biggest Gamblers Is Betting Against Elon Musk's AI Vision

https://www.wsj.com/tech/why-one-of-techs-biggest-gamblers-is-betting-against-elon-musks-ai-visio...
3•1vuio0pswjnm7•1h ago•4 comments

Reclaiming the Roads

https://worksinprogress.co/issue/reclaiming-the-roads/
2•JumpCrisscross•1h ago•0 comments

Silicon Valley has much to learn from the spreadsheet jockeys it despises

https://www.economist.com/business/2026/06/24/silicon-valley-has-much-to-learn-from-the-spreadshe...
2•1vuio0pswjnm7•1h ago•0 comments

GPS Satellites Tracker

https://www.gps-satellites.com/
1•ohjeez•1h ago•0 comments

HackMate – Automate the OpenCore Hackintosh USB Setup from Linux/Windows/macOS

https://github.com/riftaway7-code/hackmate
1•hackmateapp•1h ago•0 comments

jQuery 4.0 Performance

https://www.mida.so/blog/jquery-is-slow
2•okozzie•1h ago•0 comments