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

Linux Out-of-Bounds Access Fixed for Unprivileged Users with Crafted Certs

https://www.phoronix.com/news/Linux-OOB-Special-Certificate
1•moehm•8m ago•0 comments

Adventures in Slop: Can an AI Agent Generate Web Traffic?

https://www.tomdalling.com/blog/adventures-in-slop-can-an-ai-agent-generate-traffic/
1•ingve•9m ago•0 comments

Is Nvidia [stock] Worth 400% More? (video)

https://www.youtube.com/watch?v=xXyeTXLFfzs
1•hank808•13m ago•1 comments

Largest Curation of IAS

https://sstflix.ai
1•suschlebinger•13m ago•1 comments

Warning to drivers as Hyundai recalls 300k cars over life-threatening glitch

https://www.dailymail.co.uk/news/article-15726527/hyundai-cars-recall-seatbelt-anchor-detach.html
1•Bender•17m ago•0 comments

Git fixup is magic (and Magit is too)

https://arialdomartini.github.io/git-fixup
1•birdculture•18m ago•0 comments

Gephi – The Open Graph Visualization Platform

https://gephi.org
1•maxloh•19m ago•0 comments

India's frugal AI models are a blueprint for resource-strapped nations

https://restofworld.org/2026/india-frugal-ai-sarvam-krutrim-sovereign/
2•i7l•23m ago•0 comments

Oilfield Units: a Measurement System so Cursed it made me Change Career [video]

https://www.youtube.com/watch?v=sdWEGzWFcCc
1•CharlesW•24m ago•0 comments

At Coachella, Justin Bieber spends half an hour surfing YouTube

https://www.sfgate.com/sf-culture/article/bieber-coachella-22202157.php
1•turtlegrids•25m ago•0 comments

Vlookup Still Beats XLOOKUP in Poll of 1,975 Excel Users (53% vs. 36% vs. 12%)

https://accountsdraft.com/resources/xlookup-vs-vlookup-vs-index-match-excel-poll-results
1•Rob_Benson-May•31m ago•0 comments

Show HN: Transcribe, analyse, and chat with your voice conversations

https://github.com/nezhar/voicevault
1•nezhar•33m ago•0 comments

The Death of Character in Game Console Interfaces

https://vale.rocks/posts/game-console-interfaces
1•PaulHoule•33m ago•0 comments

Pi Coding Agent [video]

https://www.youtube.com/watch?v=O-96yYDPMOc
1•davidkunz•34m ago•0 comments

Ask HN: On autistic spectrum, best way to live?

3•beaunative•35m ago•0 comments

How the CIA Forgot the Art of Spying

https://www.politico.com/magazine/story/2017/03/cia-art-spying-espionage-spies-military-terrorism...
4•cwwc•36m ago•0 comments

Vibin' Is Easy: It's All About Data and Design Now

https://kubekattle.github.io/ktl/blog/vibin-is-easy-its-all-about-data-and-design-now.html
1•KyleVlaros•36m ago•0 comments

Applied Reverse Engineering: Crude T&E for Control-Flow Tracing

https://revers.engineering/applied-re-crude-te-for-control-flow-tracing/
1•not_a9•37m ago•0 comments

Vitamin C inhibits ACSL4 to alleviate ferro-aging in primates: Cell Metabolism

https://www.cell.com/cell-metabolism/fulltext/S1550-4131(26)00053-7
2•bilsbie•38m ago•0 comments

New Study Shows People with Higher Cholesterol Live Longer

https://www.nad.com/news/new-study-shows-people-with-higher-cholesterol-live-longer-than-people-w...
1•bilsbie•39m ago•0 comments

Show HN: Rekal – Long-term memory for LLMs in a single SQLite file

https://github.com/janbjorge/rekal
2•jeeybee•45m ago•0 comments

Over 4,732 Messages, He Fell in Love with an AI Chatbot. Now He's Dead

https://www.wsj.com/tech/ai/google-gemini-jonathan-gavalas-death-07351ab2
2•nradov•46m ago•1 comments

Maine set to become first state with data center ban

https://www.cnbc.com/2026/04/09/maine-data-center-ban.html
2•eatonphil•51m ago•1 comments

Inventors Who Didn't Invent What They Are Famous for Inventing

https://www.wsj.com/tech/us-famous-inventions-inventors-wrong-3d5b0a0f
7•fortran77•54m ago•2 comments

Space Junk – A Magazine for Earthlings Who Dream of Outer Space

https://www.nytimes.com/2026/04/09/style/a-magazine-for-earthlings-who-dream-of-outer-space.html
1•bookofjoe•55m ago•1 comments

Distilling 100B+ Models 40x Faster with TRL

https://huggingface.co/spaces/HuggingFaceTB/trl-distillation-trainer
6•kashifr•56m ago•0 comments

OpenPGx – Ask Claude about medications from your 23andMe/Genera raw file (MCP)

https://github.com/open-pgx/openpgx
1•dougplac•56m ago•1 comments

Anthropic’s Claude Mythos release created a Glomar Trap for customers and rivals

https://10io.com/blog/glomar-trap-mythos
1•anactofgod•57m ago•2 comments

Audit Claude Platform Activity with the Compliance API

https://claude.com/blog/claude-platform-compliance-api
1•mooreds•58m ago•0 comments

AI Is Not a Labor Crisis. It Is a Meaning Crisis

https://twitter.com/lessin/status/2043370537280532771
3•jger15•59m ago•0 comments