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

Show HN: Is this photo edited? Client-side image forensics

https://vajba.com/image-forensics/
1•trivsamt•1m ago•0 comments

AI can't mark its own homework

https://www.techradar.com/pro/ai-cant-mark-its-own-homework
1•ilreb•6m ago•1 comments

Rebuilding AUTOMATIC1111 with Gradio Workflow

https://huggingface.co/blog/gradio-workflow-1111
1•vertigoruntime•6m ago•0 comments

AI rent can save humanity

https://nonlineartransform.substack.com/p/how-ai-rent-can-save-humanity
2•program_whiz•6m ago•1 comments

Why and how you should run your own DNS resolver

https://www.immibis.com/blog/own-dns-resolver
1•immibis2•7m ago•0 comments

Mathematicians want proof OpenAI didn't use their work

https://www.theverge.com/ai-artificial-intelligence/993263/where-does-openai-get-mathematics-trai...
5•kevcampb•7m ago•0 comments

I Made a Real Fly Brain Play Pong. It Didn't Learn. That's the Interesting Part

https://jonatasperaza.medium.com/i-made-a-real-fly-brain-play-pong-it-didnt-learn-and-that-s-the-...
1•sebg•10m ago•0 comments

Show HN: Draw a wheel. See the road it rolls on

https://baselashraf.com/roadwright/
1•BaselAshraf81•11m ago•0 comments

A New Chess Benchmark for Language Models

https://chessbench.ai/timeline
2•soltanov•12m ago•0 comments

The iPhone Duo, the Intelligent Personal Hub, Apple Watch Audio Intelligence

https://stratechery.com/2026/the-iphone-duo-the-intelligent-personal-hub-apple-watch-audio-intell...
1•swolpers•13m ago•0 comments

A New Observable

https://observablehq.com/@observablehq/a-new-observable
1•bluemanshoe2•13m ago•0 comments

Practices I Abandoned with Agents: An Ode to Test-Driven Development

https://adamtornhill.substack.com/p/practices-i-abandoned-with-agents
2•nephrenka•16m ago•0 comments

God Help Us, Let's Try to Learn About Mechanistic Interpretability Techniques

https://www.astralcodexten.com/p/god-help-us-lets-try-to-learn-about
1•andyjohnson0•16m ago•0 comments

Arm Neoverse CSS N4 Launched for Next-Gen CPUs and DPUs – ServeTheHome

https://www.servethehome.com/arm-neoverse-css-n4-launched-for-next-gen-cpus-and-dpus/
1•rbanffy•18m ago•0 comments

What happens in practice if the P=NP problem is solved?

https://heather.cafe/posts/what-if-p-is-np-is-solved/
1•CJefferson•18m ago•0 comments

How Would AI Kill Us All? What to Know About the AI Doomsday Debate

https://www.wsj.com/tech/ai/how-would-ai-actually-kill-us-all-what-to-know-about-the-ai-doomsday-...
2•doener•18m ago•0 comments

The Dress

https://en.wikipedia.org/wiki/The_dress
4•thunderbong•19m ago•0 comments

Arista Networks Arbitrary RCE Vulnerability

https://www.arista.com/en/support/advisories-notices/security-advisory/24730-security-advisory-0174
3•joeblubaugh•21m ago•0 comments

The $2k Phone Should Be Free

https://victorantos.com/posts/the-2000-dollar-phone-should-be-free/
3•victorbuilds•21m ago•0 comments

AI agents that QA-test your web app like real users

https://www.sanitycheck.dev/
1•russellvancuren•21m ago•0 comments

LeMap – Learning Enterprise Map

https://datasong.app
1•thallukrish•22m ago•1 comments

Healthcare AI's next test is integration

https://www.technologyreview.com/2026/09/10/1141421/healthcare-ais-next-test-is-integration/
1•joozio•25m ago•0 comments

Ask HN: What is the proper way of preventing AI labs to use your private data

1•ozgung•26m ago•0 comments

Humble Bundle – 24 Linux, Cloud and Agentic AI Books

https://www.humblebundle.com/books/ultimate-linux-cloud-infrastructure-bundle-packt-books
1•kartikeypan•27m ago•0 comments

Static hosting a coding agent can drive end to end

https://novence.ai
1•LincChad•27m ago•0 comments

Yemen's Houthis Seize Strategic Red Sea Port, Officials Say

https://www.nytimes.com/2026/09/10/world/middleeast/yemens-houthis-seize-strategic-red-sea-port-o...
2•ceejayoz•27m ago•0 comments

Search engine may access the user's location without prompting them

https://chromium.googlesource.com/chromium/src.git/+/main/docs/x_geo_header.md
1•kozika•30m ago•0 comments

iPhone Pro Materials, Ranked

https://volatileinputs.com/2026/04/iphone-pro-materials-ranked/
1•simonebrunozzi•34m ago•0 comments

Keyword Research Tools

https://topkeywordresearchtools.com/
1•Keywordstat•35m ago•0 comments

The Einstein test: what happens when AI tries to rediscover relativity?

https://www.nature.com/articles/d41586-026-02804-x
1•bookofjoe•37m ago•0 comments