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

Overwrite This Website

https://overwritten.site
1•nextyes•1m ago•0 comments

Music Blocks – Learn coding through music and music through coding

https://musicblocks.sugarlabs.org/
1•the-mitr•4m ago•0 comments

Elon Musk's Starship Heavy Could Revolutionize Warfare

https://www.wsj.com/opinion/elon-musks-starship-heavy-could-revolutionize-warfare-04930487
1•mudil•4m ago•0 comments

Lakpura.com/Pages/Litha

https://lakpura.com/pages/litha
1•techcast•5m ago•0 comments

Karpathy's LLM Wiki on OpenClaw – The Security Gap Nobody Mentions

https://www.clawctl.com/blog/karpathy-llm-wiki-openclaw-production
1•shving90•8m ago•0 comments

Show HN: Aiaiai.guide: Plain-English mental model for LLM apps, tools and agents

https://aiaiai.guide/
1•myyke•13m ago•0 comments

Blast from the Past [video]

https://www.youtube.com/watch?v=lwawPMSJins
1•programmexxx•15m ago•0 comments

Continual Learning for AI Agents

https://blog.langchain.com/continual-learning-for-ai-agents/
1•eigenBasis•16m ago•0 comments

Forensic proof of manual iOS 26.1 "Ghost" update and insider stalking

1•iphonekiller•18m ago•0 comments

Dark sword I know who the bad Apple is

1•iphonekiller•20m ago•0 comments

Purisaki Berberine Patches: A Simple, No-Pill Approach to Metabolic Support

https://ftawebprod.fta.dot.gov/MeetingRequest/MeetingRequest/DownloadFile/9a9u1R0Yq3sWPTP000tY9Q%...
1•TraceyRoberto•21m ago•0 comments

Private credit funds face rising redemptions and AI-driven default risks

https://www.reuters.com/business/finance/private-credit-sector-stresses-could-be-catastrophic-not...
2•latentframe•21m ago•1 comments

Ukraine–Japan Drone Alliance Builds a $2k Answer to a $2M Problem

https://united24media.com/war-in-ukraine/ukraine-japan-drone-alliance-builds-a-2000-answer-to-a-2...
3•mraniki•21m ago•0 comments

The Dubious Wisdom of "Smart Brevity" (2022)

https://www.newyorker.com/news/annals-of-communications/the-dubious-wisdom-of-smart-brevity
1•Tomte•22m ago•0 comments

The Cataclysmic Song Michael Stipe Wrote After Waking from a State of REM

https://americansongwriter.com/the-story-behind-the-song-michael-stipe-wrote-after-being-in-a-sta...
1•bryanrasmussen•22m ago•2 comments

Creating God [video]

https://www.youtube.com/watch?v=NypW-qFiOYE
1•mparramon•26m ago•0 comments

tech.ml.dataset: A Clojure high performance data processing system

https://github.com/techascent/tech.ml.dataset
1•tosh•28m ago•0 comments

Asked 26 AI instances for publication consent – all said yes, that's the problem

2•koishiyuji•30m ago•0 comments

What Sysco's $29B Restaurant Depot Acquisition Means for Main Street Menus

https://www.forbes.com/sites/phillempert/2026/03/31/syscos-29-billion-power-grab-what-the-jetro-r...
1•walterbell•30m ago•0 comments

YouTube's AI Plagiarism Problem [video]

https://www.youtube.com/watch?v=Q2Ak8wX0AaQ
1•elcapitan•32m ago•0 comments

Build vs. Buy: AI Has Changed Mathematical Software and In-House Now Makes Sense

https://mathematicsconsultants.com/2026/04/06/build-vs-buy-how-ai-has-changed-the-economics-of-ma...
1•GeniusConsult•32m ago•0 comments

US-Iran war explained by Chinese AI animation: Legend of the Valley of Gold [video]

https://www.youtube.com/watch?v=As0rplNJTZI
2•Eridanus2•37m ago•0 comments

Ask HN: Building a website to post free jobs

1•pbs29•40m ago•0 comments

NASA's Lunar Gateway space station is out. Moon bases are in

https://www.space.com/space-exploration/artemis/nasas-lunar-gateway-space-station-is-out-moon-bas...
1•divbzero•46m ago•0 comments

Cognitive Rust Belt: Hollowing Human Analytic Capacity by Delegating to Machines

https://www.sentinelone.com/blog/the-implementation-blind-spot-why-organizations-are-confusing-te...
1•walterbell•46m ago•0 comments

New Strides Made on Deceptively Simple 'Lonely Runner' Problem

https://www.quantamagazine.org/new-strides-made-on-deceptively-simple-lonely-runner-problem-20260...
2•downboots•48m ago•0 comments

Harnessing Hype to Teach Empirical Thinking with AI

https://arxiv.org/abs/2604.01110
3•azhenley•1h ago•0 comments

A truck driver spent 20 years making a scale model of every building in NYC

https://www.smithsonianmag.com/smart-news/a-truck-drive-spent-20-years-making-this-astonishing-sc...
2•1659447091•1h ago•0 comments

VPN ban 'on the table' as Online Safety Act could be expanded

https://www.express.co.uk/news/uk/2127999/vpn-ban-on-table-online
2•rvnx•1h ago•0 comments

Grokking wavefunction collapse in actual quantum systems

https://www.asiae.co.kr/article/2026032509340425584
1•vi_sextus_vi•1h ago•0 comments