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

Firedome

https://www.fire-dome.com/
1•speckx•1m ago•0 comments

OpenQ4 0.9.0: open-source reimplementation of Quake 4

https://github.com/themuffinator/openQ4/releases/tag/v0.9.0
1•klaussilveira•2m ago•0 comments

Better to Beg Forgiveness

https://pluralistic.net/2026/07/31/just-do-it/
1•hn_acker•2m ago•0 comments

Smallpox reached the Americas: first genomic evidence points to Europeans

https://www.nature.com/articles/d41586-026-02366-y
1•Brajeshwar•2m ago•0 comments

IBM Claims Quantum Advantage with New Validation Techniques

https://spectrum.ieee.org/ibm-verifiable-quantum-advantage
1•nateb2022•3m ago•0 comments

Oceanographers Find Lessons in the Great Nike Shoe Spill (1992)

https://archive.seattletimes.com/archive/19921122/1526004/oceanographers-find-lessons-in-the-grea...
1•EndXA•3m ago•0 comments

Show HN: AI Photo Editor No Sign Up – Edit Photos with Prompts

https://aiphotoeditornosignup.online/
1•chenliang001•5m ago•0 comments

Show HN: Emacs user are you waiting for mg to get ITF-8?

https://github.com/nicholascarroll/emil
1•emil_coder•5m ago•0 comments

Stealthy Concurrent Audio Prompt Injections Against Multimodal LLM Agents

https://arxiv.org/abs/2607.28165
1•zhinit•5m ago•0 comments

U.S. debt-to-GDP ratio reaches 123%

https://fred.stlouisfed.org/series/GFDEGDQ188S
2•johnbarron•6m ago•0 comments

Show HN: Yet Another Markup Language Engineering Toolkit

https://github.com/RicardoMonteiroSimoes/Yamlet
1•RicDan•6m ago•0 comments

The Sylvester–Gallai Theorem

https://www.futilitycloset.com/2026/07/26/the-sylvester-gallai-theorem/
1•surprisetalk•6m ago•0 comments

How to Generate a TLSA Record and Fix the 3 1 1 Mismatch

https://dmarcguard.io/blog/tlsa-record-setup/
1•meysamazad•7m ago•0 comments

Go 1.27 Interactive Tour

https://victoriametrics.com/blog/go-1-27/index.html
1•olexsmir•7m ago•0 comments

A work journal to stay organised and informed

https://silviamaggidesign.com/blog/a-work-journal/
2•meysamazad•7m ago•0 comments

Why is it all in the kernel?

https://lawrencecpaulson.github.io//2026/07/30/Collatz.html
1•ibobev•7m ago•0 comments

Fixing a super 8 projector from the 70s

https://nibblestew.blogspot.com/2026/07/fixing-super-8-projector-from-70s.html
1•ibobev•8m ago•0 comments

Building a Reusable Alpine LXC Template on Proxmox

https://fmartingr.com/blog/2026/07/22/building-a-reusable-alpine-lxc-template-on-proxmox/
1•meysamazad•8m ago•0 comments

Veterans' PTSD resolves with psychedelic therapy in small US study

https://www.reuters.com/business/healthcare-pharmaceuticals/veterans-ptsd-resolves-with-psychedel...
1•giuliomagnifico•9m ago•0 comments

Arch Linux disables AUR package adoption

https://lwn.net/Articles/1086489/
1•database64128•9m ago•0 comments

The C ``Clockwise/Spiral Rule''

https://c-faq.com/decl/spiral.anderson.html
1•etrvic•11m ago•0 comments

New York Alleges Kalshi Is Running Illegal Gambling Operation

https://www.wsj.com/tech/new-york-alleges-kalshi-running-illegal-gambling-operation-18ae71b0
2•1vuio0pswjnm7•11m ago•0 comments

China's MiniMax releases H3 video model

https://www.reuters.com/world/china/chinas-minimax-releases-h3-video-model-2026-07-31/
2•nickthegreek•13m ago•0 comments

Tell HN: Gemini uses your email drafts (if you have "smart features" turned on)

2•logicallee•13m ago•4 comments

Making film archives searchable with machine learning

https://huggingface.co/spaces/davanstrien/prelinger-moments-space
1•cmcollier•16m ago•0 comments

Show HN: I Created Canva Alternative

1•singhH11•17m ago•0 comments

Concrete Is Damaging the Planet, While Defending It from Climate Change

https://www.bloomberg.com/features/2026-world-of-concrete/
2•speckx•17m ago•0 comments

Brute Intelligence

https://benn.substack.com/p/brute-intelligence
1•gmays•17m ago•0 comments

I built a platform that lets startups launch affiliate programs in minutes

https://partnac.com
2•spatocode•17m ago•0 comments

Compact GPS-enabled LoRa mesh communicator

https://specfive.com/products/spec5-minitrekker-mkii
1•DanielSusca•17m ago•0 comments