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

Talking to a PayPal scammer for 20 minutes [video]

https://www.youtube.com/watch?v=HtrcL6VcW_k
1•doener•1m ago•0 comments

Scan Your Codebase for Vulnerabilities

https://code.claude.com/docs/en/claude-security
1•cebert•4m ago•0 comments

Show HN: Readmer is a compiler for building READMEs from Liquid/Jinja2 templates

https://github.com/artob/readmer
1•arto•5m ago•0 comments

Musk's anti-Odyssey campaign backfires over threat to make AI version of epic

https://www.euronews.com/culture/2026/07/22/elon-musks-anti-odyssey-campaign-backfires-over-threa...
3•devonnull•6m ago•0 comments

Knowingness

https://registerofaliens.substack.com/p/knowingness
1•rmdmphilosopher•6m ago•0 comments

I turned the Replit/SaaStr database deletion into a runnable stop-test

https://quiesce-m7.vercel.app
2•djhirani•7m ago•0 comments

I Made My Blog Solar-Powered – A Significant Update

https://louwrentius.com/i-made-my-blog-solar-powered-a-huge-update.html
2•louwrentius•8m ago•0 comments

Australia's Greater Gliders Fly Majestically from Tree to Tree

https://nautil.us/australias-greater-gliders-fly-majestically-from-tree-to-tree-and-now-we-know-e...
1•Tomte•8m ago•0 comments

Show HN: Research Rooms for Agents

https://alexandria.clankercloud.ai/
1•tekbog•8m ago•0 comments

Claude Security Plugin for Claude Code Now in Beta

https://claude.com/product/claude-security
2•qainsights•9m ago•1 comments

Analysing Go Code with Souffle

https://blog.pzakrzewski.com/analysing-go-code-with-souffle
1•smartmic•10m ago•0 comments

Skills over MCP

https://skills-over-mcp.h3manth.com/
1•init0•10m ago•0 comments

Legoified: Predicting the Next Lego Sets

https://inorganik.net/posts/2026-07-22-legoified
1•inorganik•10m ago•0 comments

OpenAI sued over ChatGPT health advice that almost killed a pastor

https://www.engadget.com/2221044/openai-sued-over-chatgpt-health-advice-that-almost-killed-a-pastor/
2•ryanmerket•11m ago•0 comments

Requests for Startups

https://www.ycombinator.com/rfs
3•duck•13m ago•0 comments

Cortisol Could Be the Next Frontier for Wearables

https://spectrum.ieee.org/cortisol-continuous-monitor-wearable
1•binyu•14m ago•0 comments

Oh My God, Stop Asking What I Do for Work

https://blog.absurdpirate.com/oh-my-god-stop-asking-what-i-do-for-work/
4•speckx•14m ago•0 comments

Your app is a distributed system whether you like it or not

https://mob.hexdocs.pm/why_beam.html
2•minib•14m ago•0 comments

John C Dvorak – Legendary Tech Columnist and host of No Agenda has passed

https://twitter.com/na_announce/status/2079952538040672302
3•coleca•14m ago•0 comments

ICE shared Medicaid data it wasn't supposed to have with Palantir

https://www.npr.org/2026/07/17/nx-s1-5898504/ice-medicaid-palantir-data
7•Jimmc414•21m ago•0 comments

John Banville, the Art of Fiction No. 200

https://www.theparisreview.org/interviews/5907/the-art-of-fiction-no-200-john-banville
1•georgex7•21m ago•0 comments

AI-isms go deeper than em-dashes and 'load-bearing'

https://jesseduffield.com/AI-isms-go-deeper/
2•ozozozd•22m ago•0 comments

Tesla FSD got me a speeding ticket, and Tesla killed the fix

https://electrek.co/2026/07/20/tesla-fsd-speeding-ticket-removed-speed-setting/
1•logickkk1•25m ago•0 comments

World of Text

https://www.yourworldoftext.com/
1•hummus-jpg•25m ago•0 comments

The Future of Business Technology: Tools to Work Smarter (Octopus Intelligence)

https://www.octopusintelligence.com/the-future-of-business-technology-tools-that-help-companies-w...
1•knutmartin•27m ago•0 comments

Brown bullhead catfish melanoma represents a novel transmissible cancer

https://www.nature.com/articles/s41586-026-10828-6
2•sbulaev•29m ago•0 comments

Dinitz-Garg-Goemans conjecture is false

https://twitter.com/DmitryRybin1/status/2079904005652893709
3•bifftastic•30m ago•0 comments

The role of historical disasters in shaping long-term orientation

https://www.sciencedirect.com/science/article/abs/pii/S0304387826001641
1•paulpauper•30m ago•0 comments

The fall of America's farm superpower

https://www.ft.com/content/8aa89209-dc0b-4678-9b6a-01029398b304
1•paulpauper•31m ago•0 comments

How 'Artificial Intelligence' Is Slowly Drowning in Its Own Droppings

https://bsdly.blogspot.com/2026/07/how-artificial-intelligence-is-slowly.html
3•peter_hansteen•31m ago•0 comments