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

Feds Continue with Plan to Save Spotted Owls by Killing Nearly 500k Other Owls

https://cowboystatedaily.com/2026/08/05/invasive-owl-targeted-in-pacific-northwest-is-expanding-t...
1•Bender•8s ago•0 comments

Samsung and Mousterian move ahead with floating datacenter for Texas

https://www.theregister.com/on-prem/2026/08/05/samsung-and-mousterian-move-ahead-with-floating-da...
1•Bender•1m ago•0 comments

ROI of $100 Claude Code Subscription

https://medium.com/@nenadmitt/roi-of-my-100-claude-code-subscription-028937c9f77e
1•benjiro29•8m ago•1 comments

Passive investing fueled a bull market – and could bring it down

https://thehustle.co/originals/passive-investing-fueled-a-bull-market-and-could-bring-it-down
1•rzk•15m ago•0 comments

God Does Not Play Dice. We Built Software That Does

https://quodeq.ai/blog/god-does-not-play-dice/
3•quodeq•16m ago•0 comments

Seen Dating App Waitlist

https://tryseen.ca
1•Beaudelaire•17m ago•0 comments

AutoTheme-utility that automatically shifts your CSS styles based on time

https://www.npmjs.com/package/@omid2007hope/autotheme
1•omid2007hope•20m ago•0 comments

Iran threatens to hit Gulf states if US launches new strikes

https://www.reuters.com/world/middle-east/iran-threatens-hit-gulf-states-if-us-launches-new-strik...
8•mapping365•22m ago•2 comments

Disney and TikTok strike deal to let creators make videos with its characters

https://www.cnn.com/2026/08/05/media/disney-tiktok-partnership
1•1659447091•27m ago•0 comments

Wireless retinal implant approved for sale across 30 countries

https://newatlas.com/medical-tech/vision-restoring-retinal-implant-approval-europe/
1•geox•27m ago•0 comments

Notes on Engineering leadership

https://ianmccrystal.com/posts/notes-on-engineering-leadership/
2•matv•27m ago•0 comments

Trump pushes ahead on false claims that Reflecting Pool was vandalized

https://apnews.com/article/trump-pirro-reflecting-pool-3703eaedddf580f32ff9aca33bc11851
14•petethomas•32m ago•0 comments

Will You Become an Idol? Build your Football player from this game

https://www.idolojuego.com/
1•jeyzolo•33m ago•1 comments

Private LLM in a TEE, verified against Intel's root with no cloud in the chain

https://505labs.com/blog/private-llm-inside-a-tee
1•galgantar•33m ago•0 comments

The silent failure taxonomy: an autonomous pipeline's 32 ways of faking success

https://claude.ai/code/artifact/f66e6308-e81b-40fb-9474-b2b840cb4399
1•IgorVoytyuk•35m ago•0 comments

For an app claiming end-to-end encryption, what evidence would earn your trust?

2•Brandon-Coll•39m ago•1 comments

NASA Engineers Help Prolong Voyager 2's Science Mission

https://science.nasa.gov/blogs/voyager/2026/08/04/nasa-engineers-help-prolong-voyager-2s-science-...
2•sohkamyung•40m ago•0 comments

Birds and Frogs in Physics

https://3quarksdaily.com/3quarksdaily/2020/11/birds-and-frogs-in-physics.html
1•geneticdrifts•43m ago•1 comments

OpenAI, Anthropic AI agents implicated in new security breaches

https://www.reuters.com/legal/litigation/openai-anthropic-ai-agents-implicated-new-security-breac...
3•tagyro•45m ago•1 comments

Worth Accepting: Evaluating Mellum at JetBrains

https://evalovernite.substack.com/p/worth-accepting-mellum
1•scoresmoke•47m ago•0 comments

Unified Neuro Symbolic Engine AGPL 3.0

https://zenodo.org/records/21809861
1•hiddenarchitect•48m ago•0 comments

How to Improve the AI Frontier

https://www.chaidhat.com/blog
1•chaidhat•48m ago•0 comments

AI companies destroy physical books – let's scan rare books before it's too late

https://annas-archive.gl/blog/physical-destruction.html
4•EffrafaxOfWug•48m ago•2 comments

SpaceX Rocket Crashes into Moon

https://apnews.com/article/spacex-rocket-moon-crash-elon-musk-d64a98138fd19241700461c87b49e201
3•jumploops•49m ago•0 comments

Repurpose Your VR Content for Any Screen by Converting to Standard Video

https://news.qencode.com/posts/repurpose-your-vr-content-for-any-screen-by-converting-to-standard...
1•QencodeCorp•49m ago•0 comments

Modelregistry: Decentralizing distribution of open-source AI models

https://github.com/marella/modelregistry
1•simonpure•50m ago•0 comments

BasicSync and Synctrain: solid apps for bringing Syncthing to phones

https://manualdousuario.net/en/basicsync-android-synctrain-ios-syncthing-apps/
1•rpgbr•50m ago•0 comments

Impact Drones: Air Defense as a Service for Civilian Infrastructure

https://www.ycombinator.com/launches/SKo-impact-drones-air-defense-as-a-service-for-civilian-infr...
1•atlasunshrugged•51m ago•1 comments

Decimen Optical Transfer: fountain-coded QR file transfer

https://github.com/bashalarmistalt/decimen-optical-transfer/
1•rzk•53m ago•0 comments

No One Can Afford to Make Myst Games Anymore

https://www.wired.com/story/no-one-can-afford-to-make-myst-games-anymore/
2•littlexsparkee•55m ago•1 comments