frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Any good tools to pgdump multi tenant database?

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

Why is AI slop so frustrating to read?

https://twitter.com/zhizdev/status/2119874095269707977
1•espeed•58s ago•1 comments

Texpresso: A True Wysiwyg System for Open-Source LaTeX Design

https://github.com/let-def/texpresso
1•mathlab08•6m ago•0 comments

OpenRing – self-hosted voice AI agents with a Vapi-compatible API

https://github.com/elifalanrocha/openring
1•elifalanrocha•9m ago•0 comments

Sophon-Realtime v1

https://huggingface.co/adventists-ai/Sophon-Realtime-v1
1•keyle•9m ago•0 comments

ByteAsk: Build-Aware Context and a Checking Harness for C++ Coding Agents

https://byteask.ai/research/byteask-system-cpp
1•anirudhak•13m ago•0 comments

Male donkey is a bull's willing partner in rare interspecies affair

https://www.cnn.com/2026/11/09/science/donkey-bull-interspecies-mating-behavior
1•1659447091•15m ago•1 comments

How the Phone Book Taught America to Ask for Answers

https://daily.jstor.org/how-the-phone-book-taught-america-to-ask-for-answers/
1•herbertl•17m ago•0 comments

Three Short Essays on Jazz

https://www.tetragrammaton.com/article/three-short-essays-on-jazz
1•herbertl•18m ago•0 comments

Lab-grown poultry company challenges Florida's ban on 'cultivated' meat

https://www.yahoo.com/news/lab-grown-poultry-company-challenges-183938365.html
1•ArizonaGal•21m ago•0 comments

SVG sky map with Ruby and Astronoby

https://blog.rhannequ.in/posts/svg-sky-map-with-ruby-and-astronoby
1•thunderbong•21m ago•0 comments

HeyWhatsThat – Calculate viewshed and panorama for any point on Earth (2022)

https://www.heywhatsthat.com/
1•zenincognito•22m ago•0 comments

How to Become a Lost

https://www.l3r8y.ru/2026/01/11/how-to-become-lost-developer
1•l3r8y•24m ago•0 comments

Attackers Claim to Have Stolen Data on over 1M Vanderbilt Students, Staff

https://gizmodo.com/attackers-claim-to-have-stolen-data-on-over-1-million-vanderbilt-students-and...
1•pseudolus•25m ago•0 comments

Trump's ties to Nvidia's Huang scrutinized after foreign intelligence concerns

https://www.reuters.com/world/asia-pacific/trumps-close-ties-nvidias-huang-scrutinized-after-fore...
2•lakeviewterrace•27m ago•1 comments

Learning Abstractions: The Next Frontier for AI

https://twitter.com/jmugan/status/2119593410268999700
1•jmugan•28m ago•0 comments

Show HN: I abandoned my AVX2 128-bit fixed-point library

https://github.com/arjavsharma91/v4q128
1•arjavsharma91•28m ago•1 comments

Managing Cover Crops Profitably [pdf]

https://www.sare.org/wp-content/uploads/Managing-Cover-Crops-Profitably.pdf
1•Bluestein•29m ago•0 comments

Hundreds of Mundane AI Apps Are Hiding Sexually Abusive Deepfake Features

https://www.wired.com/story/hundreds-of-mundane-ai-apps-are-hiding-abusive-deepfake-features/
1•CharlesW•30m ago•0 comments

Does paying more get you better reviews? Rarely

https://www.bettascore.ai/research/price-vs-reviews
1•tsxng•32m ago•0 comments

Recursive Self-Improving Terminal Agents via Recursive Self-Rewrite

https://arxiv.org/abs/2610.22192
1•UncleOxidant•32m ago•0 comments

Endless Portal Worlds

https://portals-endless-worlds.netlify.app/
1•bigwheels•34m ago•0 comments

Replacing Dairy with Plant-Based Alternatives Can Lead to Nutrient Deficiencies

https://www.smithsonianmag.com/smart-news/even-replacing-some-of-your-dietary-dairy-with-plant-ba...
2•rdmuser•40m ago•1 comments

What if every Nix build were bit-reproducible?

https://fzakaria.com/2026/11/09/what-if-every-nix-build-were-bit-reproducible
2•iamnothere•40m ago•0 comments

Show HN: Stop Walking – A 10-level, one-button 3D rage game in the browser

https://stopwalking.online
1•admingiftcure•41m ago•1 comments

Welcome to Ed and Sam's great adventure

https://www.hintz.org/trip/
1•mooreds•41m ago•0 comments

Locating the Source of a Mysterious Beep

https://simonwillison.net/2026/Nov/9/mysterious-beeps/
1•bigwheels•42m ago•0 comments

Why Don't Artists Join Together in Co-Op Platforms?

https://www.honest-broker.com/p/why-dont-artists-join-together-in
2•paulpauper•43m ago•0 comments

Perhaps Connecting Fridges to the Internet Was a Bad Idea

https://www.theatlantic.com/technology/2026/11/fridge-hacks-europe-supermarkets/689328/
3•paulpauper•44m ago•1 comments

What Constant Surveillance Is Doing to Children

https://www.theatlantic.com/magazine/2026/12/location-tracking-apps-parental-surveillance/689031/
2•paulpauper•45m ago•0 comments

How I Give Feedback

https://diatone.net/feedback
1•s1ddhant•45m ago•0 comments