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

The Gap Map v0.1

https://www.currentai.org/blogs/introducing-the-gap-map-v0-1#article
2•droidjj•2m ago•0 comments

Ants: Who looks after the injured in a colony?

https://www.uni-wuerzburg.de/en/news-and-events/news/detail/news/ameisen-kolonie-verletzte-pflegt/
3•hhs•7m ago•0 comments

How Amsterdam invented the fire department

https://worksinprogress.co/issue/how-amsterdam-invented-the-fire-department/
3•zdw•7m ago•0 comments

GitHub offering CD-ROMs of your code for a few days

https://www.pcgamer.com/hardware/your-code-is-physically-yours-forever-until-you-lose-it-lets-be-...
2•evo_9•8m ago•1 comments

Shopify SEO Experts Can Boost Your Online Store Rankings

https://www.techwrath.com/shopify-seo-experts-boost-online-store-rankings/
2•techwrath11•12m ago•1 comments

Giant trees have no trouble pumping water to top branches

https://news.exeter.ac.uk/faculty-of-environment-science-and-economy/giant-trees-have-no-trouble-...
2•hhs•13m ago•0 comments

Steam Controller Auto-Charge – pilot to magnetic charging puck using CV

https://github.com/FossPrime/Steam-Controller-Auto-Charge
2•zdw•14m ago•0 comments

Save Claude Code Tokens with Smart Routing

https://github.com/regolo-ai/brick-SR1
2•FrancescoMassa•14m ago•0 comments

Elevating Privileges from Firefox to Android Root

https://rootme.nebusec.ai/
3•kozika•14m ago•0 comments

Dispersion loss counteracts embedding condensation in small language models

https://chenliu-1996.github.io/projects/LM-Dispersion/
2•E-Reverance•18m ago•0 comments

David Potter, the man who put Psion in the palm of your hand, logs off at 82

https://www.theregister.com/personal-tech/2026/07/03/david-potter-the-man-who-put-psion-in-the-pa...
4•sohkamyung•19m ago•1 comments

GitFut – Your GitHub stats turned into a World-Cup-style player card

https://gitfut.com
2•redbell•19m ago•0 comments

Sneaker Company Allbirds Plans to Pivot to A.I

https://www.nytimes.com/2026/04/15/us/allbirds-shoes-ai-pivot.html
2•shepherdjerred•20m ago•1 comments

Leanstral 1.5: Proof Abundance for All

https://mistral.ai/news/leanstral-1-5/
3•programLyrique•20m ago•0 comments

Show HN: Scout.kids – Agents that find activies for families

https://scout.kids
2•davmar•21m ago•0 comments

Radiolarite – "Iron of the Paleolithic"

https://en.wikipedia.org/wiki/Radiolarite
2•jumploops•26m ago•0 comments

Overturning a $1B Copyright Award Against a Broadband Provider

https://cacm.acm.org/opinion/overturning-a-1-billion-copyright-award-against-a-broadband-provider/
1•zdw•27m ago•0 comments

Coding without AI: a revolutionary new way to work

https://isaaclyman.com/blog/posts/coding-without-ai/
12•aard•27m ago•2 comments

Trip LLM safety refusals so that LLM-based code scanning wont see the malware

https://indieweb.social/@laurenshof/116720287681995824
1•radiator•27m ago•0 comments

Disputing the Declaration of Independence

https://www.historytoday.com/archive/feature/disputing-declaration-independence
3•pepys•36m ago•0 comments

Cosmic Fireworks by Infant Stars

https://www.space.com/astronomy/galaxies/infant-stars-celebrate-their-independence-with-cosmic-fi...
1•cybermango•40m ago•0 comments

Archivegenocide.com 64k videos show evidence of Israeli genocide

https://archivegenocide.com/
3•Dig1t•40m ago•0 comments

Show HN: Reading Assistant Physical Books Meta RayBans

1•roshangill•46m ago•0 comments

AI Trade Is Losing One of Its Key Signals

https://www.bloomberg.com/news/articles/2026-07-03/the-ai-trade-is-losing-one-of-its-key-signals-...
3•cybermango•51m ago•0 comments

Why Vancouver is always a stand-in for San Francisco in movies and TV shows

https://www.sfgate.com/sf-culture/article/vancouver-stand-in-movie-tv-sf-16613821.php
2•amichail•55m ago•0 comments

The Demoralization of the White-Collar Worker

https://nooneshappy.com/article/the-demoralization-of-the-white-collar-worker/
24•njrc•1h ago•15 comments

Illegible Benefits

https://aeon.co/essays/what-we-cant-measure-about-ai-yet
2•m-hodges•1h ago•0 comments

GLM5.2 on AMD MI355X at 2626 tok/s/node at over 2x lower cost than Blackwell

https://www.wafer.ai/blog/glm52-amd
2•latchkey•1h ago•0 comments

The Termi Protocol: Watch AI Coding Agents Build in 3D

https://termiprotocol.com/
1•jonbaer•1h ago•1 comments

Show HN: Durable AI agents without the workflow engine

https://www.noworkflows.dev/
3•iacguy•1h ago•0 comments