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

Spack: A flexible package manager for HPC software

https://computing.llnl.gov/projects/spack-hpc-package-manager
1•teleforce•2m ago•0 comments

NASA is sending people to the moon in spacecraft some experts think is not safe

https://www.cnn.com/2026/01/23/science/artemis-2-orion-capsule-heat-shield
2•ck2•2m ago•0 comments

New Patches Aim to Lower Linux Memory Use for Swap, Slightly Improve Performance

https://www.phoronix.com/news/Linux-Better-Swap-Tencent
1•XzetaU8•2m ago•0 comments

Welcome to the American Winter

https://www.theatlantic.com/politics/2026/01/minneapolis-uprising/685755/
1•empath75•3m ago•1 comments

The Danger of a Single Capital Letter: How I Almost Ruined a Redmine Instance

https://blog.devbert.de/the-danger-of-a-single-capital-letter/
1•preezer•3m ago•0 comments

Brex and the Pros and Cons of Hubristic Fundraising

https://www.saastr.com/brex-and-the-pros-and-cons-of-hubristic-fundraising/
1•wslh•4m ago•0 comments

Qwen3-Max-Thinking

https://qwen.ai/blog?id=qwen3-max-thinking
5•vinhnx•6m ago•0 comments

Building Brains on a Computer

https://www.asimov.press/p/brains
1•mailyk•6m ago•0 comments

Is the US Supreme Court Biased Towards the Rich?

https://www.nominalnews.com/p/is-the-us-supreme-court-bias-wealthy
2•MasPL•6m ago•1 comments

Notes on German Exit Tax from Paid Tax Advisor Calls

https://wegzugsteuer.info/en
1•olieidel•7m ago•0 comments

My vibe engineering process and stack

https://aimode.substack.com/p/my-vibe-engineering-process-and-stack
1•warthog•9m ago•0 comments

What We Can't Control (2016)

https://solomon.io/what-we-cant-control/
1•samsolomon•9m ago•0 comments

Competitive Pure Functional Languages

https://blog.samibadawi.com/2026/01/competitive-pure-functional-languages.html
1•type-lambda•9m ago•0 comments

Technology is changing how we write – and how we think about writing

https://www.nature.com/articles/d41586-026-00245-0
1•geox•11m ago•1 comments

Mods, when will you get on top of the constant AI slop posts?

https://old.reddit.com/r/programming
1•birdculture•13m ago•0 comments

Show HN: I built a tool for automated failure analysis in GitHub Actions

https://github.com/marketplace/actions/github-actions-failure-analysis
1•calebevans•15m ago•0 comments

Linear-Term: A TUI for Linear Project Management

https://github.com/tjburch/linear-term
1•tjburch•15m ago•0 comments

The Age of Impoliteness: Galateo: Or, a Treatise on Politeness (1774)

https://publicdomainreview.org/collection/galateo/
1•Anon84•16m ago•0 comments

Novel biosensor enables real-time tracking of iron (II) in living cells

https://pubs.acs.org/doi/10.1021/acssensors.5c02481
1•bookofjoe•16m ago•0 comments

Go tests probably don't need a mocking library

https://rednafi.com/go/mocking-libraries-bleh/
1•AlexeyBelov•16m ago•1 comments

Saudi Arabia ordered to pay £3M to London dissident over Pegasus spying

https://www.theguardian.com/world/2026/jan/26/saudi-arabia-ordered-pay-london-dissident-pegasus-s...
2•chrisjj•18m ago•1 comments

Cop-assisted extortion of DWI arrestees in New Mexico include getting them drunk

https://reason.com/2026/01/23/cop-assisted-extortion-of-dwi-arrestees-in-new-mexico-included-gett...
22•leephillips•19m ago•0 comments

Common Sense

https://en.wikipedia.org/wiki/Common_Sense
1•emmabruns•20m ago•0 comments

ICE follows starkly different playbooks in red and blue states

https://www.cnn.com/2025/08/05/us/immigration-arrests-community-ice-invs
7•rbanffy•21m ago•3 comments

Windows 11's Patch Tuesday nightmare gets worse

https://www.windowscentral.com/microsoft/windows-11/windows-11s-botched-patch-tuesday-update-nigh...
15•01-_-•21m ago•3 comments

ESA Meerkat Asteroid Guard: a monitoring service for imminent impactors

https://arxiv.org/abs/2601.13323
1•belter•21m ago•0 comments

Ask HN: How do you balance clarity vs speed in communication?

1•simon-rebbins•22m ago•1 comments

OracleGPT: Thought Experiment on an AI Powered Executive

https://senteguard.com/blog/#post-7fYcaQrAcfsldmSb7zVM
2•djwide•23m ago•1 comments

An Afghan entrepreneur turned sanctions into a $60M-per-month aid platform

https://thebitgazette.com/afghanistans-quiet-crypto-breakthrough-in-aid/
3•campusninja•23m ago•0 comments

Women's skepticism toward AI: The role of risk orientation and risk exposure

https://academic.oup.com/pnasnexus/article/5/1/pgaf399/8429563?login=false
3•PaulHoule•24m ago•0 comments