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

Porting Lean to the ESP32-C3 RISC-V Microcontroller

https://kuruczgy.com/blog/2024/07/31/lean-esp32/
1•panic•1m ago•0 comments

Defeating Kaslr by Doing Nothing at All

https://googleprojectzero.blogspot.com/2025/11/defeating-kaslr-by-doing-nothing-at-all.html
1•signa11•2m ago•0 comments

Human friendly industrial device IDs

https://bec-systems.com/2563/human-friendly-industrial-device-ids/
1•cbrake•4m ago•0 comments

Hobbes' Internet Timeline 25

https://www.zakon.org/robert/internet/timeline/
1•signa11•4m ago•1 comments

iPhone fans always want this year's model, but what about everyone else?

https://sixcolors.com/post/2025/10/iphone-fans-always-want-this-years-model-but-what-about-everyo...
1•Amorymeltzer•13m ago•1 comments

Python concurrency: gevent had it right

https://harshal.sheth.io/2025/09/12/python-async.html
1•hsheth2•17m ago•1 comments

Quinnypig/Yeet

https://github.com/quinnypig/yeet
3•rootforce•23m ago•0 comments

Ask HN: Lawyers of HN, how do you deal with AI slop?

4•gardnr•24m ago•1 comments

AI researchers 'embodied' an LLM into a robot – and it channeled Robin Williams

https://techcrunch.com/2025/11/01/ai-researchers-embodied-an-llm-into-a-robot-and-it-started-chan...
1•gnabgib•24m ago•0 comments

Ford Foundation's New Leader Vows to Protect Elections and the Rule of Law

https://www.nytimes.com/2025/11/03/us/politics/ford-foundation-heather-gerken-trump.html
2•whack•25m ago•0 comments

Unpaid Domestika and CGMA Instructors Protest Online, Students Join over Billing

https://www.classcentral.com/report/domestika-unpaid-instructors/
1•raybb•26m ago•0 comments

11X Faster ScyllaDB Backup

https://www.scylladb.com/2025/11/04/11x-faster-scylladb-backup/
1•tanelpoder•26m ago•0 comments

Thoughts by a non-economist on AI and economics

https://www.lesswrong.com/posts/QQAWu7D6TceHwqhjm/thoughts-by-a-non-economist-on-ai-and-economics
1•gwintrob•33m ago•0 comments

Petri Dish Neural Cellular Automata

https://pub.sakana.ai/pdnca/
1•hardmaru•34m ago•0 comments

Lazy Backup (2006)

http://www.aaronsw.com/weblog/lazybackup
3•varun_ch•43m ago•1 comments

Free Learning in Today's Society: Some Personal Experiences and Reflections

https://www.lesswrong.com/posts/pESH2aYfu4B9rhNEm/free-learning-in-today-s-society-some-personal-...
2•gmays•50m ago•0 comments

Show HN: Send USDC via Email

https://btwnfriends.com/
3•Must_be_Ash•51m ago•0 comments

The Physics of News, Rumors, and Opinions

https://arxiv.org/abs/2510.15053
2•Anon84•53m ago•0 comments

Experiences with AI-Generated Pornography

https://link.springer.com/article/10.1007/s10508-025-03227-x
3•tokai•56m ago•0 comments

Datadog Instance Explorer

https://instances.datadoghq.com/
2•scapecast•1h ago•0 comments

You Freeze in Meetings (Even When You Know You Stuff)

https://www.youtube.com/watch?v=BOOB4nlhTZ4
3•polymath88•1h ago•1 comments

Ups Cargo Plane Crashes in Kentucky

https://www.wsj.com/business/logistics/ups-cargo-plane-crashes-in-kentucky-1a199671
3•CSMastermind•1h ago•1 comments

Enabling Trillion-Parameter Models on AWS EFA

https://research.perplexity.ai/articles/enabling-trillion-parameter-models-on-aws-efa
2•tanelpoder•1h ago•0 comments

FDA described as a "clown show" amid latest scandal; top drug regulator is out

https://arstechnica.com/health/2025/11/fda-described-as-a-clown-show-amid-latest-scandal-top-drug...
34•duxup•1h ago•5 comments

UBS chair warns of 'looming systemic risk' from private credit ratings

https://www.ft.com/content/73ee8c6d-3c04-425e-9d2c-ecbf2f376a4f
3•moose_man•1h ago•0 comments

Why Crypto Can't Build Anything Long-Term

https://x.com/therosieum/article/1984987750647333350
4•salkahfi•1h ago•2 comments

How Much AI Spending Is Too Much? Investors Are Starting to Wonder

https://www.wsj.com/finance/stocks/how-much-ai-spending-is-too-much-investors-are-starting-to-won...
9•moose_man•1h ago•0 comments

Famous Method of Valuing Stocks Is Pointing Toward Some Rough Years Ahead

https://www.wsj.com/finance/investing/this-famous-method-of-valuing-stocks-is-pointing-toward-som...
4•moose_man•1h ago•1 comments

For a Literary Saint, Margaret Atwood Can Sure Hold a Grudge

https://www.nytimes.com/2025/11/01/books/review/margaret-atwood-book-of-lives-memoir.html
3•binning•1h ago•0 comments

Cleaning an orange iPhone 17 Pro with hydrogen peroxide turns it pink

https://www.pcmag.com/news/has-your-orange-iphone-17-turned-pink-turns-out-youre-to-blame
3•zdw•1h ago•0 comments