frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

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

Swatch and Audemars Piguet Are Planning a Collaboration Watch

https://www.hodinkee.com/articles/its-official-swatch-and-audemars-piguet-are-planning-a-collabor...
1•nstj•39s ago•0 comments

Lawsuit accuses ChatGPT of helping gunman plan FSU mass shooting

https://www.pbs.org/newshour/nation/lawsuit-accuses-chatgpt-of-helping-gunman-plan-fsu-mass-shooting
1•anigbrowl•3m ago•0 comments

Childhood Computing

https://lilysthings.org/blog/childhood-computing/
1•birdculture•6m ago•0 comments

Olive CSS: Lisp powered vanilla CSS utility-Class A la Tailwind

https://codeberg.org/jjba23/olive-css
1•PaulHoule•7m ago•0 comments

Gamingshuvo

https://blog.cloudflare.com/post-quantum-warp/
1•Gamingshuvo•9m ago•0 comments

Family of Florida mass shooting victim sues OpenAI in US court

https://www.reuters.com/legal/government/family-florida-mass-shooting-victim-sues-openai-us-court...
1•tartoran•11m ago•0 comments

Tech Companies Fail to Kill Colorado's 'Right to Repair' Law

https://www.techdirt.com/2026/05/11/tech-companies-fail-to-kill-colorados-right-to-repair-law/
1•cdrnsf•12m ago•0 comments

All Roads Lead to AI Rome

https://medium.com/towards-artificial-intelligence/all-roads-lead-to-ai-rome-1c601f1ec440
1•vektormemory•12m ago•1 comments

Tesla recalls every Cybertruck RWD ever sold because the wheels could fall off

https://finance.yahoo.com/markets/stocks/articles/tesla-recalls-every-cybertruck-rwd-140500699.html
4•cdrnsf•13m ago•0 comments

Day After Grizzly Attack, Dimwitted Tourist Takes Video of Bear from 5 Feet Away

https://cowboystatedaily.com/2026/05/08/day-after-grizzly-attack-dimwitted-tourist-takes-video-of...
1•Bender•14m ago•0 comments

People Who Don't Like People Are Making All of Our Decisions

https://www.theatlantic.com/ideas/2026/05/waymo-self-driving-cars/687119/
2•bentaber•15m ago•1 comments

Griffin PowerMate driver for modern macOS

https://github.com/jameslockman/Griffin-PowerMate-Driver
2•classichasclass•15m ago•0 comments

Making your developer platform agent-ready

https://hookdeck.com/blog/developer-platform-agent-ready
1•mooreds•16m ago•0 comments

Official PCIe 8.0 draft aims for 1 TB/s data rate

https://www.theregister.com/storage/2026/05/07/official-pcie-80-draft-aims-for-1-tb/s-data-rate/5...
1•Bender•17m ago•0 comments

What's in the 2026 Hugo Awards Voter Packet?

https://compellingsciencefiction.com/posts/what-s-in-the-2026-hugo-awards-voter-packet.html
1•mojoe•19m ago•0 comments

Essays on Dwarkesh's "Big Questions on AI"

https://12gramsofcarbon.com/p/why-is-ai-still-scaling-how-do-the
1•theahura•21m ago•0 comments

Sovereign cloud is only possible if you're Chinese or American: Gartner

https://www.theregister.com/off-prem/2026/05/11/sovereign-cloud-is-only-possible-if-youre-chinese...
1•Bender•22m ago•0 comments

Byron Allen to Buy a Controlling Stake in BuzzFeed

https://www.nytimes.com/2026/05/11/business/media/buzzfeed-byron-allen.html
2•jaredwiener•24m ago•0 comments

Coloradan can plug his brain into a computer

https://www.denverpost.com/2026/05/10/colorado-brain-computer-interface/
1•rolph•25m ago•0 comments

Through the looking glass of benchmark hacking

https://poolside.ai/blog/through-the-looking-glass
1•jxmorris12•26m ago•0 comments

Meta-Meta-Prompting: The Secret to Making AI Agents Work

https://twitter.com/garrytan/status/2053127519872614419
2•gmays•27m ago•0 comments

Why Airport Security Feels Random

https://yusufaytas.com/why-airport-security-feels-random
5•legallytired•32m ago•0 comments

Dead internet theory: AI-generated articles using MCP [video]

https://vimeo.com/1191324557
1•linksku•33m ago•0 comments

No more Access Denied – I am TrustedInstaller(2023)

https://fourcore.io/blogs/no-more-access-denied-i-am-trustedinstaller
1•rolph•33m ago•0 comments

AI Hype vs. AI Reality

https://fixingtao.com/2026/05/ai-hype-vs-ai-reality/
2•gslepak•36m ago•0 comments

Agent View in Claude Code

https://claude.com/blog/agent-view-in-claude-code
2•elffjs•36m ago•0 comments

New US counterterror strategy focuses on cartels but omits right-wing extremism

https://www.pbs.org/newshour/show/new-u-s-counterterror-strategy-focuses-on-drug-cartels-but-omit...
3•latexr•41m ago•2 comments

TanStack NPM Packages Compromised

https://github.com/TanStack/router/issues/7383
41•varunsharma07•43m ago•3 comments

I Built an AliExpress Homelab, Is It Surprisingly Good or Total E-Waste?

https://the-diy-life.com/i-built-an-aliexpress-homelab-is-it-surprisingly-good-or-total-e-waste/
1•bdcravens•43m ago•0 comments

From E-Waste to AIPowerhouse:Upcycling Smartphones for load-balanced LLM cluster

https://www.gesellschaft-zur-entwicklung-von-dingen.de/challenge
2•luckow•43m ago•1 comments