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

A 639 years old concert

https://en.wikipedia.org/wiki/As_Slow_as_Possible
1•kristianpaul•27s ago•0 comments

Why Ramp Won

https://operatorjournal.substack.com/p/why-ramp-won
1•brandonb•58s ago•0 comments

I Transcribed 362 Episodes of My Favorite Podcast Using Codex and Exe.dev

https://juandavidcampolargo.substack.com/p/how-i-transcribed-362-episodes-of
1•jdcampolargo•1m ago•0 comments

Ask HN: SWE to CAD Career Switch

1•justchad•2m ago•0 comments

State of the Windows: What is going on with Windows 11?

https://ntdotdev.wordpress.com/2026/01/25/state-of-the-windows-what-is-going-on-with-windows-11/
1•xd1936•3m ago•0 comments

The effect of environmental regulations on municipal bonds

https://phys.org/news/2026-01-effect-environmental-municipal-bonds.html
1•PaulHoule•4m ago•0 comments

Show HN: AI Native Reading Companion

https://www.readmimir.com/login
1•GunnhildurF24•4m ago•0 comments

Show HN: I built a voice journal app to let me journal more

https://www.thinkaloud.app
2•donadev•7m ago•2 comments

SubChat – toolset for generating YouTube subtitles from chat logs

https://github.com/Kam1k4dze/SubChat
1•modinfo•7m ago•0 comments

Zerobrew – Uv Inspired Homebrew

https://xcancel.com/gucaslelfond/status/2015602447499092349
1•Alifatisk•8m ago•0 comments

Signals: Toward a Self-Improving Agent

https://factory.ai/news/factory-signals
1•ahmadyan•9m ago•0 comments

Making niche solutions is the point

https://ntietz.com/blog/making-niche-solutions-is-the-point/
1•evakhoury•10m ago•0 comments

NASA Reveals New Details About Dark Matter's Influence on Universe

https://www.nasa.gov/missions/webb/nasa-reveals-new-details-about-dark-matters-influence-on-unive...
3•divbzero•12m ago•0 comments

What Is PrecisionRush?

1•mrgrj•12m ago•0 comments

Wikipedia's largest non-English version was created by a bot

https://www.abc.net.au/news/science/2025-04-15/wikipedia-cebuano-lsjbot-ai-article-generation-non...
1•vinnyglennon•12m ago•0 comments

ePub and PDF for "The Adolescence of Technology"

https://www.adithyan.io/blog/kindle-ready-adolescence-of-technology
1•adithyan_win•16m ago•1 comments

Leader in smallpox eradication, Dr. William Foege, dies at 89

https://www.pbs.org/newshour/science/leader-in-smallpox-eradication-dr-william-foege-dies-at-89
4•toomuchtodo•18m ago•1 comments

Earth2Studio: Nvidia's next generation of weather AI

https://github.com/NVIDIA/earth2studio
4•nadis•18m ago•1 comments

Show HN: First autonomous ML and AI engineering Agent

https://marketplace.visualstudio.com/items?itemName=NeoResearchInc.heyneo
1•svij137•21m ago•0 comments

A New Edition of the Stanford Emerging Technology Review Is Online

https://www.thefreedomfrequency.org/p/a-new-edition-of-the-stanford-emerging
1•mudil•21m ago•0 comments

Show HN: ScaleMind AI – B2B outreach for $2K/mo instead of $10K agencies

https://fatihai.app
1•dagustu•22m ago•0 comments

Sunlight Optimism Calculator [UK]

https://dracos.co.uk/made/sunlight-optimism/
1•DamonHD•22m ago•0 comments

H2 in space explains dark matter and Redshift

http://www.newtonphysics.on.ca/hydrogen/index.html
2•fanf2•24m ago•2 comments

Polar Amplification

https://en.wikipedia.org/wiki/Polar_amplification
1•cainxinth•24m ago•0 comments

I tested every Japanese app that came out in the last 2 years–these are the best

https://old.reddit.com/r/LearnJapanese/comments/1phbsk4/
2•wahnfrieden•26m ago•0 comments

Hackeurope Challenge

1•xrInU•27m ago•0 comments

The Windows Workgroup

https://swift.org/blog/announcing-windows-workgroup/
3•frizlab•30m ago•0 comments

Agent Skills in the Wild an Empirical Study of Security Vulnerabilities at Scale

https://arxiv.org/abs/2601.10338
1•knoxa2511•31m ago•0 comments

An Open Source Motorized XYZ MicroManipulator – Affordable Sub µm Motion Control [video]

https://www.youtube.com/watch?v=MgQbPdiuUTw
1•nickparker•32m ago•1 comments

How do you share your AI prompts/tools?

1•phil611•33m ago•0 comments