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

From Brain Waves to Words: Brain2Qwerty Offers a New Path to Communication

https://ai.meta.com/blog/brain2qwerty-brain-ai-human-communication/?_fb_noscript=1
1•tilt•37s ago•0 comments

We built FRQ-NC, your personalized podcast

https://frq-nc.com/
1•FRQ-NC•2m ago•0 comments

WSJ Article Claiming China Has Matched Anthropic Is Obvious Nonsense

https://thezvi.substack.com/p/wsj-article-claiming-china-has-matched
1•7777777phil•3m ago•0 comments

KEDA Audit Complete

https://ostif.org/keda-audit-complete/
1•helenOSTIF•6m ago•0 comments

Building AI Agents in Ruby with the Anthropic SDK

https://nsinenko.com/rails/ai-agents/architecture/2026/06/09/building-ai-agents-ruby-anthropic-sdk/
1•nikita-ruby•7m ago•0 comments

Neocolonialism

https://en.wikipedia.org/wiki/Neocolonialism
1•1equalsequals1•7m ago•0 comments

Notes from Bryan Cantrill's "Intelligence Is Not Enough"

https://blog.jim-nielsen.com/2026/intelligence-isnt-enough/
1•Brajeshwar•8m ago•0 comments

US Supreme Court rejects Trump's unprecedented bid to fire Fed's Cook

https://www.reuters.com/world/us-supreme-court-rejects-trumps-unprecedented-bid-fire-feds-cook-20...
2•kaycebasques•8m ago•0 comments

AI models' values are different from most people's

https://www.economist.com/briefing/2026/06/25/ai-models-values-are-very-different-from-most-peoples
1•andsoitis•9m ago•0 comments

AI Accountability in Justice and Medicine – Ethics and EU AI Act

https://neuralcoretech.com/ai-accountability-justice-medicine/
1•neuralcoretech•9m ago•0 comments

An agent opened this pull request. Nobody asked it to

https://www.marcoziccardi.com/blog/ai-agents-open-pr-autonomously
1•marcoziccardi•10m ago•0 comments

Distributism

https://en.wikipedia.org/wiki/Distributism
2•supermdguy•12m ago•1 comments

Universal Basic Income

https://en.wikipedia.org/wiki/Universal_basic_income
2•andsoitis•12m ago•0 comments

WATaBoy: JIT-Ing Game Boy Instructions to WASM Beats a Native Interpreter

https://humphri.es/blog/WATaBoy/
2•energeticbark•12m ago•0 comments

It's Linux, on a Sega Genesis

https://hackaday.com/2026/06/29/its-linux-on-a-sega-megadrive/
2•HardwareLust•13m ago•1 comments

WebGL Without a GPU

https://microlink.io/blog/webgl-without-a-gpu
3•Kikobeats•13m ago•0 comments

Rejection Emails Should Be Written Like Error Messages

https://landedstar.com/blog/posts/rejection-emails-should-be-written-like-error-messages/
1•lifefeed•13m ago•0 comments

Brain2Qwerty: Brain-to-text decoder by Meta

https://facebookresearch.github.io/brain2qwerty/
1•Sathwickp•14m ago•0 comments

Extracting standalone HTML files from Lovable, Figma make, Canva code and more

https://productnow.ai/blogs/extracting-html-from-ai-prototyping-tools
1•kadhirvelm•14m ago•0 comments

Did a bar scan your face this Pride weekend?

https://sfstandard.com/2026/06/29/catro-faceid-delete-patronscan/
1•tobadzistsini•14m ago•0 comments

Stop Paying More for Less Transit

https://ifp.org/stop-paying-more-for-less-transit/
1•surprisetalk•14m ago•0 comments

Brain2Qwerty v2

https://github.com/facebookresearch/brain2qwerty
1•ilreb•14m ago•0 comments

Infini – Audit your agent project for loop portability (0-100 score)

https://github.com/NickAiNYC/infini
1•alt313•18m ago•1 comments

Eyes Do Not Work the Way They Appear To

https://ishan.co/no-way/
1•speckx•18m ago•0 comments

Deezer's new tool can identify AI music from Spotify, Apple Music, and others

https://techcrunch.com/2026/06/11/deezers-new-tool-can-identify-ai-music-from-spotify-apple-music...
1•austinallegro•19m ago•0 comments

BT Group and Verizon to form joint venture

https://www.verizon.com/about/news/verizon-bt-group-international-joint-venture
2•qainsights•19m ago•0 comments

Working with AI

https://htmx.org/essays/working-with-ai/
3•comma_at•21m ago•1 comments

Hard-Boiled Prediction Markets and the End of the World

https://thebestworstcase.substack.com/p/hard-boiled-prediction-markets-and
1•shmublu•22m ago•0 comments

Nukes for All (But Finland First) [video][3 mins]

https://www.youtube.com/watch?v=q_7-T4mXxdI
1•Bender•25m ago•0 comments

Hangul, the only major writing system with a known inventor

https://spacedaily.com/d-the-korean-alphabet-called-hangul-is-the-only-major-writing-system-in-hu...
2•softwarebakery•25m ago•0 comments