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

We asked four AI coding agents to rebuild Minesweeper–the results were explosive

https://arstechnica.com/ai/2025/12/the-ars-technica-ai-coding-agent-test-minesweeper-edition/
1•todsacerdoti•2m ago•0 comments

Apple Clings to Samsung as RAM Prices Soar

https://www.macrumors.com/2025/12/22/apple-clings-to-samsung-as-ram-prices-soar/
1•walterbell•6m ago•0 comments

The Geopolitics of Net Zero

https://substack.com/inbox/post/181235681
1•pjb88•6m ago•0 comments

Why Custom Evals Matter for Production LLMs

https://www.randalolson.com/2025/12/22/why-custom-evals-matter-for-production-llms/
1•turoczy•7m ago•0 comments

Inference Economics 101: Reserved Compute versus Inference APIs

https://www.datagravity.dev/p/inference-economics-101-reserved
1•gmays•7m ago•0 comments

US regulators approve Wegovy pill, first oral medication to treat obesity

https://www.theguardian.com/us-news/2025/dec/22/us-regulators-approve-wegovy-weight-loss-pill
2•LopRabbit•7m ago•0 comments

Patrick Roach Sues Verizon for Refusing to Unlock His Phone (and Wins)

https://www.techdirt.com/2025/12/23/kansas-resident-patrick-roach-successfully-sues-verizon-for-r...
1•speckx•9m ago•0 comments

Is Shenzhen the SF of China? Here are my takeaways

https://elliotlindberg.com/posts/is-shenzhen-the-sf-of-china
1•robiot•9m ago•0 comments

Uzbekistan's nationwide license plate surveillance system

https://techcrunch.com/2025/12/23/inside-uzbekistans-nationwide-license-plate-surveillance-system/
1•_____k•10m ago•0 comments

Waitrose – Unofficial CLI and API client for Waitrose grocery shopping

https://github.com/jonastemplestein/waitrose
2•montyanderson•11m ago•0 comments

Nebula Awards Yelled at Until They Ban Use of AI by Nominees

https://gizmodo.com/nebula-awards-yelled-at-until-they-completely-ban-use-of-ai-by-nominees-20007...
4•gnabgib•15m ago•0 comments

Why Chinese Energy Projects Are Facing a Backlash in the Balkans

https://oilprice.com/Energy/Energy-General/Why-Chinese-Energy-Projects-Are-Facing-a-Backlash-in-t...
1•PaulHoule•15m ago•0 comments

An amateur codebreaker may have just solved the Black Dahlia and Zodiac killings

https://www.latimes.com/california/story/2025-12-23/black-dahlia-zodiac-killings-connected-one-ki...
4•davweb•15m ago•0 comments

Kimwolf Exposed: The Android Botnet with 1.8M Infected Devices

https://blog.xlab.qianxin.com/kimwolf-botnet-en/
3•_____k•16m ago•0 comments

Oral History of Jeffrey Ullman [video]

https://www.youtube.com/watch?v=wROQBhBuq1w
1•matt_d•16m ago•0 comments

Energy Predictions 2025

https://caseyhandmer.wordpress.com/2025/12/08/energy-predictions-2025/
1•simonebrunozzi•17m ago•0 comments

We Become What We Behold

https://ncase.itch.io/wbwwb
1•gmays•18m ago•0 comments

Farewell, Bandhub. I will miss you (2019)

https://garybadger.com/2019/03/03/farewell-bandhub-i-will-miss-you/
1•Aldipower•21m ago•0 comments

Old-school rotary phone dials into online meetings

https://www.theregister.com/2025/11/24/rotary_phone_online_meetings/
2•ohjeez•21m ago•0 comments

Microsoft bets on AI to modernize Windows

https://www.windowscentral.com/microsoft/windows-11/my-goal-is-to-eliminate-every-line-of-c-and-c...
1•sanqui•22m ago•2 comments

Puzzle Designers Search for That 'Satisfying Click'

https://www.nytimes.com/2025/12/22/science/games-puzzle-design.html
1•robinhouston•24m ago•0 comments

Context is all you need

https://fakepixels.substack.com/p/context-is-all-you-need
2•walterbell•26m ago•0 comments

Top MCP tools for software architects

https://icepanel.io/blog/2025-11-05-top-mcp-tools-for-software-architects
1•shehabas•26m ago•0 comments

Nature Programming Language

https://nature-lang.org/
1•birdculture•27m ago•1 comments

Exposing Honey's Evil Business Model Part 2 [video]

https://www.youtube.com/watch?v=wwB3FmbcC88
4•busymom0•29m ago•1 comments

LLVM AI Policy and Automatic Bazel Fixes

https://www.phoronix.com/news/LLVM-AI-Tool-Policy-RFC
1•boomanaiden154•32m ago•0 comments

Smokejumping

https://heidiwaterhouse.com/smokejumping/
1•mooreds•33m ago•1 comments

The Null Pointer Identity: Debugging the Architecture of the Chinese Self

https://suggger.substack.com/p/the-null-pointer-identity-debugging
1•Suggger•36m ago•2 comments

Progress on the Digital Euro

https://www.ecb.europa.eu/euro/digital_euro/html/index.en.html
3•janandonly•38m ago•1 comments

On the rural Colorado plains, cancer patients rely on this traveling oncologist

https://coloradosun.com/2025/12/21/rural-colorado-plains-cancer-patients-traveling-oncologist/
2•mooreds•39m ago•0 comments