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

Bio-Theory Lab Notes: Growth Rates and Worm Brains

https://chillphysicsenjoyer.substack.com/p/bio-theory-lab-notes
1•crescit_eundo•15s ago•0 comments

Grainrad: Browser ASCII/Dithering Tool

https://grainrad.com/
2•smusamashah•8m ago•0 comments

Markdown Viewer – Get This Extension for Firefox (En-US)

https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-extension/
1•dp-hackernews•9m ago•0 comments

Using Information Entropy to Make Choices / Choose Experiments

https://blog.demofox.org/2025/10/05/using-information-entropy-to-make-choices-choose-experiments/
1•deadbishop•9m ago•0 comments

Daxfs Proposed as Newest Linux File-System

https://www.phoronix.com/news/DAXFS-Linux-File-System
1•Bender•10m ago•0 comments

CachyOS Starts 2026 by Switching to Plasma Login Manager, Live ISO Using Wayland

https://www.phoronix.com/news/CachyOS-January-2026
2•Bender•11m ago•0 comments

OptiMind: Research Model Designed for Optimization

https://huggingface.co/blog/microsoft/optimind
1•gmays•11m ago•0 comments

Almost 12,000 flights canceled as major winter storm bears down across US

https://ktla.com/news/nationworld/ap-over-8000-flights-canceled-as-major-winter-storm-bears-down-...
2•Bender•11m ago•0 comments

Dorodango: the hobby that took over Japan in 1999

https://www.youtube.com/watch?v=2H0r81kv5GA
1•n1b0m•16m ago•0 comments

Announcing winapp, the Windows App Development CLI

https://blogs.windows.com/windowsdeveloper/2026/01/22/announcing-winapp-the-windows-app-developme...
1•CharlesW•16m ago•0 comments

I don't write code anymore – I sculpt it

https://www.jerpint.io/blog/2026-01-24-i-dont-write-code-anymore-i-sculpt-it/
2•jerpint•16m ago•0 comments

We didn't ask for 'smart' cars – so why are we getting them?

https://www.autocar.co.uk/opinion/new-cars/we-didn%E2%80%99t-ask-smart-cars-so-why-are-we-getting...
5•breve•16m ago•2 comments

Policy-Based Routing on an OpenWrt Router

https://dariusz.wieckiewicz.org/en/policy-based-routing-openwrt
4•idarek•16m ago•1 comments

Writing a Go SQL Driver

https://www.dolthub.com/blog/2026-01-23-golang-sql-drivers/
1•ingve•16m ago•0 comments

Terraform Actions: Deep-Dive

https://mattias.engineer/blog/2025/terraform-actions-deep-dive/
1•based2•17m ago•0 comments

The chronically online will become a new underclass [video]

https://www.youtube.com/watch?v=Bm2Q9HkbLsQ
2•nanfinitum•19m ago•0 comments

Isolating Claude Code

https://yieldcode.blog/post/isolating-claude-code/
1•ingve•19m ago•0 comments

Hybrid and electric semi truck sales topped 231,000 units 2025 – in China alone

https://electrek.co/2026/01/24/hybrid-and-electric-semi-truck-sales-topped-231000-units-2025-in-c...
2•breve•19m ago•0 comments

Seat-back psychology helped a WA business build a dynasty

https://www.seattletimes.com/business/boeing-aerospace/how-seat-back-psychology-helped-a-wa-busin...
1•CharlesW•19m ago•0 comments

Divergent creativity in humans and large language models

https://www.nature.com/articles/s41598-025-25157-3
2•geox•19m ago•0 comments

Im fucking serious, you can just do things

https://vibe.devpost.com
2•abdibrokhim•22m ago•0 comments

Lennart Poettering and the Cause of Civility

https://www.linux-magazine.com/Online/Blogs/Off-the-Beat-Bruce-Byfield-s-Blog/Lennart-Poettering-...
2•written-beyond•23m ago•0 comments

Is ICE Running a Black Site in Minnesota?

https://neuburger.substack.com/p/is-ice-running-a-black-site-in-minnesota
11•jpster•26m ago•2 comments

Continental Power, Maritime Power, and the Fight for a New World Order

https://www.foreignaffairs.com/united-states/land-or-sea-paine
2•mooreds•29m ago•1 comments

Ten Ways to Fool the Masses When Presenting Battery Research (2021)

https://chemistry-europe.onlinelibrary.wiley.com/doi/10.1002/batt.202100154
2•johlo•29m ago•0 comments

Why AI Mentions Brands More Than It Recommends Them, and What That Means for SEO

https://www.flygen.ai/
2•AaronMeslin•30m ago•1 comments

The case for active management when so few outperform the S&P 500

https://www.startribune.com/s-and-p-500-index-stock-market-outperform-active-managed-fund-tech-ai...
2•mooreds•30m ago•0 comments

As the Arctic warms up, the race to control the region is growing ever hotter

https://theconversation.com/as-the-arctic-warms-up-the-race-to-control-the-region-is-growing-ever...
1•PaulHoule•30m ago•0 comments

AI Tribalism

https://nolanlawson.com/2026/01/24/ai-tribalism/
2•todsacerdoti•31m ago•1 comments

Gulbenkian Prize for Humanity

https://gulbenkian.pt/en/the-foundation/gulbenkian-prize-for-humanity/
2•mooreds•33m ago•0 comments