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

Neuro Engine – MCP server cutting AI coding token waste by up to 96%

https://neuro-engine.netlify.app
1•lorenzoferreira•18s ago•0 comments

Show HN: IP to Company API – turn any IP into business data

https://elioplus.com/ip-to-company-api
1•iliasanta•1m ago•0 comments

Diesel prices in U.S. top $6 a gallon for first time

https://www.cbsnews.com/news/rising-diesel-prices-consumer-impact/
1•ck2•2m ago•0 comments

Why DuckDB 2.0 is faster

https://motherduck.com/blog/why-duckdb-20-is-faster/
1•jonbaer•4m ago•0 comments

Ask HN: What is the average number of hops in your social network to 9-11 death?

2•MrCoffee7•5m ago•0 comments

How Did Louis Armstrong Forever Change the World of Jazz Music?

https://www.thecollector.com/great-satchmo-contribution-jazz/
1•Tomte•5m ago•0 comments

Long form story with Qwen 0.8B

https://voice.cogumi.com/story-maker/
1•aichelles•7m ago•1 comments

Portainer 3.0 is coming, and here's what it means for you

https://www.portainer.io/blog/portainer-3-0-is-coming
1•treesknees•7m ago•0 comments

Show HN: Hazzel – tiny, open-source, Git-native coding agent

https://github.com/mukundzha/hazzel
5•mukundjha06•8m ago•0 comments

Most ambitious Linux project of all time failed, lawsuits more lucrative

https://www.howtogeek.com/most-ambitious-linux-project-failed-because-lawsuits-were-more-lucrative/
1•dxs•10m ago•0 comments

Ashes Become Stones: The Science Behind Solidified Remains

https://blog.partingstone.com/how-ashes-become-stones-the-science-behind-solidified-remains/
1•magthor•11m ago•0 comments

At Bending Spoons, the Numbers Are the Real Mind-Bender

https://www.wsj.com/finance/investing/at-bending-spoons-the-numbers-are-the-real-mind-bender-43f1...
1•codechicago277•11m ago•0 comments

Meta deployed agents and fired 8000 employees

https://economictimes.indiatimes.com/markets/us-stocks/wall-street-guide/25-year-old-hedge-fund-m...
1•gilfoyle_7•12m ago•0 comments

Show HN: Flashviz, Microcontroller flash and RAM 3D visualization

https://clisystems.com/tools/flashviz/
1•drewcg•12m ago•0 comments

Show HN: I bypassed my Claude Code deny-list 8 ways; only an allow-list held

https://github.com/danielhagever/agent-guardrails-kit
1•glitchbound•14m ago•0 comments

Show HN: File that is both valid bash and PowerShell, and replaces curl – bash

https://github.com/remcovanmook/hexec
1•remcovm•15m ago•0 comments

How We Automated Kubernetes with Crossplane

https://engineering.moniepoint.com/kubernetes-infrastructure-with-crossplane-functions
1•CellsD•15m ago•0 comments

A familiar and performant compile time CSS-in-JS library for React

https://compiledcssinjs.com/
1•janpot•15m ago•0 comments

How to Build a $20B Semiconductor Fab (2024)

https://www.construction-physics.com/p/how-to-build-a-20-billion-semiconductor
2•Bluestein•15m ago•0 comments

Claude Co-work needs Windows Security Update uninstalled to function properly

https://github.com/anthropics/claude-code/issues/92984
1•wilburx3•17m ago•1 comments

Show HN: A Modern C++ course with videos and interactive GitHub homeworks

https://github.com/cpp-for-yourself
1•soinus•18m ago•1 comments

Ross Ulbricht (Silk Road founder) talks at RNC convention

https://www.youtube.com/watch?v=_cakAFOp9dw
2•Arodex•19m ago•2 comments

Show HN: SOS – Project state between coding agent sessions

https://github.com/sigmastratum/sigma-operator-stack
1•teugent•21m ago•0 comments

Where Has Construction Automation Been Successful?

https://www.construction-physics.com/p/where-has-construction-automation
2•thelastgallon•21m ago•0 comments

Ask HN: Can we please limit the AI news flood?

142•cromka•26m ago•55 comments

Mochi 1.0 released

https://mochi-os.org/
1•a_cunningham•27m ago•1 comments

Aging US water systems are no match for climate change

https://www.bloomberg.com/news/newsletters/2026-09-11/us-water-and-sewer-systems-can-t-cope-with-...
3•simonebrunozzi•30m ago•0 comments

Takeaway cups release microplastics into your coffee

https://news.uq.edu.au/2026-08-takeaway-cups-release-microplastics-your-coffee
1•the-mitr•31m ago•0 comments

Five diverse AI agents vs. five clones for 14 nights: a constant tied both

https://thoughts.jock.pl/p/five-lenses-one-brain-agent-diversity-experiment-2026
1•joozio•33m ago•0 comments

Derveni Papyrus

https://en.wikipedia.org/wiki/Derveni_papyrus
1•gradus_ad•33m ago•0 comments