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

When crows join your LiveKit call

https://eniveld.substack.com/p/when-crows-join-your-livekit-call
1•davidz•54s ago•0 comments

Apple Is Quietly Building the Most Profitable AI Toll Booth

https://seekingalpha.com/article/4902208-apple-quietly-building-most-profitable-ai-toll-booth
1•ndr42•2m ago•0 comments

UAE Building 'Cope Cages' to Protect Energy Facilities from Drone Attack

https://www.twz.com/news-features/uae-building-massive-cope-cages-to-protect-energy-facilities-fr...
2•uticus•4m ago•0 comments

Six SQL patterns I use to catch transaction fraud

https://analytics.fixelsmith.com/posts/sql-fraud-patterns/
1•analyticsfs•4m ago•0 comments

How Mamdani and Hochul Are Solving New York City's Budget Crisis

https://www.nytimes.com/2026/05/12/nyregion/mamdani-budget-nyc.html
1•thunderbong•5m ago•0 comments

Project Bluefin now based on top of GNOME OS

https://docs.projectbluefin.io/blog/making-our-own-fate/
1•trogdor3000•5m ago•0 comments

Obsidian Sync Audits by Cure53 and Trail of Bits

https://obsidian.md/blog/cure53-tob-sync-audits/
2•cdrnsf•8m ago•0 comments

Aictx – Repo-local continuity runtime for coding agents

https://github.com/oldskultxo/aictx
2•santism•8m ago•1 comments

Stochastic Parrots: Frequently Unasked Questions

https://medium.com/@emilymenonbender/stochastic-parrots-frequently-unasked-questions-49c2e7d22d11
1•olalonde•11m ago•0 comments

How the U.S. Became the Greatest Energy Exporter

https://www.wsj.com/business/energy-oil/us-energy-exports-charts-60f29985
1•JumpCrisscross•13m ago•0 comments

Adult game industry complaint to FTC regarding Visa/Mastercard (2025) [pdf]

https://avvn.org/ftc.pdf
1•Scaled•13m ago•1 comments

Crypto Revolution

https://tera-finance.io
1•tyoma_cho•14m ago•0 comments

Stacktree – The publish primitive for agent-made HTML

https://stacktr.ee/
1•indigodaddy•15m ago•0 comments

Show HN: AICTL – A native AI agent for terminal and macOS, in Rust

https://aictl.app
1•piotrwittchen•16m ago•1 comments

The Chakram and its Forgotten Technique [video]

https://www.youtube.com/watch?v=IyBXkhTzAK0
1•Nevaeh•17m ago•0 comments

Claude programmatic usage get separate budget

https://xcancel.com/ClaudeDevs/status/2054610152817619388
1•willempienaar•18m ago•0 comments

I built a reference Go project (and taught an AI agent to clone it)

https://aran.dev/posts/why-i-built-a-reference-go-project/
1•aranw•19m ago•0 comments

From News Articles to Knowledge Graphs with SpaCy and NetworkX

https://data4sci.substack.com/p/from-news-articles-to-knowledge-graphs
1•Anon84•21m ago•0 comments

The 'Special Child' Trap: From 'Indigo' to Modern Identity

https://growsomelabia.substack.com/p/indigo-vs-trans-children-status
1•GSL_Commentary•22m ago•0 comments

Meta won't let you block its AI account on Threads

https://www.theverge.com/tech/929091/meta-ai-threads-account-block
7•logickkk1•24m ago•2 comments

I built an iPhone app for practicing happiness through small daily actions

https://apps.apple.com/us/app/practice-of-happiness/id6466039739
1•practiceofhappy•24m ago•0 comments

Made This Free URL Shortener with Indepth Analytics

https://old.reddit.com/r/sideprojects/comments/1tabelm/finished_making_this_url_shortener_complet...
1•godlymod•24m ago•0 comments

RFV-0001: Request for Vibes

https://tomaytotomato.com/request-for-vibes/
2•tomaytotomato•27m ago•0 comments

Why We Ignore Advice

https://yusufaytas.com/why-we-ignore-advice
13•yusufaytas•27m ago•1 comments

New Linux kernel security bug; Fragnesia

https://www.openwall.com/lists/oss-security/2026/05/13/3
3•tankenmate•27m ago•0 comments

Ask HN: How to Invest 10K EUR

3•default_•28m ago•2 comments

Harvard Votes on Limiting "A" Grades

https://www.axios.com/local/boston/2026/05/11/harvard-faculty-vote-grade-inflation-cap-a-grades-i...
2•smurda•28m ago•1 comments

What happened to the car designed for women, by women?

https://uxdesign.cc/what-happened-to-the-car-designed-for-women-by-women-1fdcde8a0bc4
1•rmason•30m ago•2 comments

The AI Apocalypse

https://www.youtube.com/watch?v=8nsxuB3Vsts
1•indigodaddy•30m ago•0 comments

Continuous lamination unlocks production of large-area flexible circuit boards

https://techxplore.com/news/2026-04-lamination-stable-production-large-area.html
3•PaulHoule•32m ago•0 comments