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

Build Systems Are Spreadsheets

https://functional.computer/blog/build-systems-are-spreadsheets
1•judicious•59s ago•0 comments

Why Sourcegraph and Amp Are Becoming Independent Companies

https://sourcegraph.com/blog/why-sourcegraph-and-amp-are-becoming-independent-companies
1•amirathi•1m ago•0 comments

Nvidia CEO Jensen Huang admits he works 7 days a week, in a constant anxiety

https://fortune.com/2025/12/04/nvidia-ceo-admits-he-works-7-days-a-week-including-holidays-in-a-c...
1•wslh•2m ago•0 comments

T-17 Carbon Telephone Transmitter Button Mod and HodgePodge

http://k4che.com/T-17/T-17.htm
1•brudgers•4m ago•0 comments

Show HN: Driving Android app via LLM. Looking for feedback

1•philippb•11m ago•0 comments

What do you think of my landing Page designed in Canva

https://createamarketplace.com/
1•cladian•13m ago•1 comments

Netflix in exclusive talks to buy HBO

https://www.cnn.com/2025/12/04/media/netflix-paramount-wbd-bidding-war-warner-bros-discovery
3•mikeweiss•14m ago•0 comments

A Golden Year (2025): Gold's Price Surge – The Signal in the Noise

https://aswathdamodaran.blogspot.com/2025/11/a-golden-year-2025-golds-price-surge.html
1•kamaraju•15m ago•0 comments

Planet VPN

https://freevpnplanet.com/
1•bitlogicdev•16m ago•1 comments

Rats Snatching Bats Out of the Air and Eating Them–Researchers Got It on Video

https://www.smithsonianmag.com/smart-news/rats-are-snatching-bats-out-of-the-air-and-eating-them-...
2•bookofjoe•24m ago•0 comments

Heaven's Gate Public Key

https://www.heavensgate.com/misc/secure.htm
1•imwally•31m ago•1 comments

The Greenlandic Santa Claus: The Fairytale That Disappeared (2022)

https://www.sermitsiaq.ag/kultur/den-gronlandske-julemand-eventyret-der-forsvandt/313490
2•tokai•36m ago•0 comments

Energy-Generating Floor Tiles: How Pavegen Turns Steps into Power

https://insights.greyb.com/pavegen-energy-generating-floor-tiles-patents/
2•Rahul035•39m ago•1 comments

AI as a WordPress Fundamental

https://make.wordpress.org/core/2025/12/04/ai-as-a-wordpress-fundamental/
1•gslin•43m ago•0 comments

Fast trigram based code search

https://github.com/sourcegraph/zoekt
2•cv_h•50m ago•0 comments

Sugars, 'Gum,' Stardust Found in NASA's Asteroid Bennu Samples

https://www.nasa.gov/missions/osiris-rex/sugars-gum-stardust-found-in-nasas-asteroid-bennu-samples/
1•ryan_j_naughton•51m ago•0 comments

Anthropic's Claude Interviewer

https://claude.ai/interviewer
2•Brajeshwar•52m ago•0 comments

Weird FFmpeg Use Cases

https://www.twitch.tv/videos/2635259036
2•implabinash•57m ago•1 comments

Nvidia CUDA Tile

https://developer.nvidia.com/cuda/tile
4•elkguy•59m ago•0 comments

PRC State-Sponsored Actors Use Malware Across Public Sector and IT Systems

https://www.cisa.gov/news-events/alerts/2025/12/04/prc-state-sponsored-actors-use-brickstorm-malw...
3•gslin•59m ago•0 comments

Vpternlog: Signed Saturation

https://wunkolo.github.io/post/2025/12/vpternlog-signed-saturation/
1•mfiguiere•1h ago•0 comments

Nanopositioning Metrology, Gödel, and Bootstraps

https://www.pi-usa.us/en/tech-blog/nanopositioning-metrology-goedel-and-bootstraps
3•nill0•1h ago•0 comments

Show HN: A fun sustainability marketplace for teams

https://createamarketplace.com/social-marketplace
1•cladian•1h ago•0 comments

Nano Banana Pro – AI Image Editor with Perfect Text Rendering and 4K

https://nanobanana.org
2•MikeMoh•1h ago•0 comments

Warner Bros Begins Exclusive Deal Talks With Netflix

https://www.bloomberg.com/news/articles/2025-12-05/warner-bros-is-said-to-begin-exclusive-deal-ta...
2•mfiguiere•1h ago•2 comments

High Friction Learning Habits: Why Your "Second Brain" Is Failing

https://medium.com/@awabs/jit-learning-why-just-in-case-information-gets-deleted-by-your-brain-15...
2•Awab•1h ago•0 comments

NeuralRemaster: Phase-Preserving Diffusion for Structure-Aligned Generation

https://www.youtube.com/watch?v=pqmdsO1L45w
1•E-Reverance•1h ago•0 comments

Review: Surreal Numbers

https://signoregalilei.com/2025/11/26/review-surreal-numbers/
3•surprisetalk•1h ago•1 comments

A Man I Want to Meet the Most

https://chillphysicsenjoyer.substack.com/p/the-man-i-want-to-meet-the-most
3•surprisetalk•1h ago•0 comments

Rabbit Hole Learning

https://seated.ro/posts/rabbit-hole-learning.html
4•surprisetalk•1h ago•0 comments