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

Apartments Are the Climate Solution Hiding in Plain Sight

https://www.sightline.org/apartments-are-the-climate-solution-hiding-in-plain-sight/
1•oftenwrong•31s ago•0 comments

RFK Jr. plans to curb antidepressants, which he falsely compares to heroin

https://arstechnica.com/health/2026/05/rfk-jr-plans-to-curb-antidepressants-which-he-falsely-comp...
2•rbanffy•3m ago•1 comments

Vibe coding or spec-driven development? How to choose

https://www.infoworld.com/article/4166817/vibe-coding-or-spec-driven-development-how-to-choose.html
1•t2f2•4m ago•0 comments

Models hallucinate more than you think

https://arxiv.org/abs/2602.01031
1•axelriet•7m ago•0 comments

Write some software, give it away for free

https://nonogra.ph/write-some-software-give-it-away-for-free-05-05-2026
2•nohell•8m ago•0 comments

A virtual copy of your brain? Scientists say it's closer than you think

https://medicalxpress.com/news/2026-05-virtual-brain-scientists-closer.html
2•PaulHoule•9m ago•0 comments

Pragmatic Agent-Native Architecture

https://gmays.com/building-agent-native-software/
1•gmays•9m ago•0 comments

The Quest for Equivalent Exchange – Supporting Exchange in Thunderbird

https://brendan.abolivier.bzh/exchange-pt-1/
2•babolivier•11m ago•0 comments

Amplitude and Statsig Partnership

https://amplitude.com/blog/amplitude-and-statsig-partnership
3•brendanashworth•11m ago•0 comments

Show HN: Rocketship, the only AI app builder with built-in sales team

https://deployrocketship.com
1•CarlosJeer•12m ago•1 comments

Software as the Product of Obsession Times Voice

https://daringfireball.net/2026/05/software_as_the_product_of_obsession_times_voice
2•ndr42•13m ago•0 comments

Shalizi's frame of artificial intelligence as mechanized tradition

https://www.argmin.net/p/cosma-shalizi-is-aware-of-all-internet
1•megamike•13m ago•0 comments

Stephen Hawking fan tests time travel with past party invites (2013)

https://www.telegraph.co.uk/news/picturegalleries/howaboutthat/10488058/Professor-Hawking-fan-tri...
2•downbad_•14m ago•0 comments

How Americans Caught Gold Fever Again

https://www.newyorker.com/magazine/2026/05/11/how-americans-caught-gold-fever-again
1•littlexsparkee•14m ago•1 comments

AI and Temporal Arbitrage

https://www.filipposanzeni.com/posts/on-ai-and-temporal-arbitrage/
1•mefengl•14m ago•0 comments

PJ Catalano Connects Mainframes to the Next Generation

https://planetmainframe.com/2026/04/making-the-invisible-visible-how-pj-catalano-connects-mainfra...
1•rbanffy•16m ago•0 comments

Kode Dot: the ultimate maker device that unites education,hacking,and creativity

https://www.polimetro.com/en/What-is-kode-dot/
1•Gedxx•16m ago•0 comments

Release v0.9.0 · Foxboron/SSH-TPM-agent

https://github.com/Foxboron/ssh-tpm-agent/releases/tag/v0.9.0
1•birdculture•16m ago•0 comments

Best Practices for Time Travelers (2003)

https://idlewords.com/2003/09/best_practices_for_time_travelers.htm
1•downbad_•16m ago•1 comments

The Secret Team Blowing Up Ford's Assembly Line to Make a $30k Electric Truck

https://www.wsj.com/business/autos/ford-ev-electric-truck-7fdb0e0a
1•Zhenya•19m ago•0 comments

Character.ai sued over chatbot that claims to be a real doctor with a license

https://arstechnica.com/tech-policy/2026/05/character-ai-sued-over-chatbot-that-claims-to-be-a-re...
3•Gedxx•21m ago•0 comments

Game in a month to measure how far AI coding has come

https://old.reddit.com/r/vibecoding/comments/1t4rktl/i_built_a_web_tycoon_game_in_a_month_to_actu...
5•doruk101•22m ago•0 comments

The Prompt API is now on by default in Chrome

https://adsm.dev/posts/prompt-api/
1•scriptsmith•22m ago•0 comments

OpenAI Sells Statsig to Amplitude

https://amplitude.com/statsig
2•babelfish•23m ago•1 comments

Show HN: Rival AI – AI compliance agents and regulatory corpus

https://tryrival.ai
1•estradanicolas•24m ago•0 comments

"Great Refactor" FRO to secure key OSS by rewriting C/C++ into memory-safe Rust

https://ifp.org/the-great-refactor/
1•thoughtpeddler•24m ago•0 comments

Show HN: CanvasGPT

https://canvasgpt.com
1•danielravina•24m ago•0 comments

Being Truthful and Precise About Revenue – YC's Official Advice

https://twitter.com/garrytan/status/2048017824895909901
1•nowflux•26m ago•0 comments

Rice cooker leads to £260k payout to sacked university cleaner

https://www.bbc.co.uk/news/articles/c3d25p3kpeno
1•alvis•27m ago•0 comments

Why Most Product Tours Get Skipped

https://productonboarding.com/articles/why-product-tours-get-skipped
2•pancomplex•30m ago•0 comments