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 I'm Building Muse

https://twitter.com/alexandr_wang/status/2103551714536439951
1•tosh•1m ago•0 comments

Young organs may not be a fountain of youth for recipients

https://www.technologyreview.com/2026/09/25/1145083/young-organs-may-not-be-a-fountain-of-youth-f...
1•joozio•4m ago•0 comments

If we do not stop to help each other, what do we become?

https://blog.codinghorror.com/if-we-do-not-stop-to-help-each-other-what-do-we-become/
2•AndrewDucker•8m ago•0 comments

Anybody has experience with maintaining self hosted Git?

1•tusharmaroo•9m ago•0 comments

Alberta's image as world's only rat-free region shattered by discovery of rat

https://www.theguardian.com/world/2026/sep/25/alberta-canada-rat-patrol
3•pseudolus•15m ago•0 comments

What Is Math's Mysterious Langlands Program About?

https://www.quantamagazine.org/what-is-maths-mysterious-langlands-program-really-about-20260909/
2•signa11•17m ago•0 comments

Thought on how to deal with AI crawlers

https://copepod.dev/human-required
2•meredithbloom•18m ago•0 comments

Isn't it enough just to disconnect bloatware from internet instead of disabling?

https://f-droid.org/packages/io.github.dorumrr.de1984/
2•tukunjil•21m ago•0 comments

It's a Jev's World

https://www.bolna.ai/blog/testing-jev-on-real-phone-calls
3•xan_ps007•21m ago•0 comments

The Sleazy World of Reddit Marketing, Everything Is Fake

https://larslofgren.com/reddit-marketing/
4•landdate•27m ago•0 comments

AI was supposed to hit new grads hard. So far, unemployment data says otherwise

https://arstechnica.com/ai/2026/09/ai-was-supposed-to-hit-new-grads-hard-so-far-unemployment-data...
4•MrDresden•29m ago•1 comments

About Jammertest

https://www.jammertest.no/about/
3•Tomte•30m ago•0 comments

Novelist accused of using AI to write book removed from French prize list

https://www.theguardian.com/books/2026/sep/25/thelyson-orelien-goncourt-prize-france
3•pieterr•33m ago•0 comments

Luhnify – Zero-PII API for ID, Vat and Passport Validation (<100ms)

https://luhnify.com
2•josebermejo•36m ago•0 comments

Show HN: Translate a SVG back to a diagram – drawio

https://zoosky.github.io/accent-draw/
2•akapaka•36m ago•1 comments

LeftOpen – Native macOS menu bar app to see what's on localhost and close it

https://github.com/SonghaiFan/leftopen
2•songhai•37m ago•0 comments

Advice to a Beginning Software Engineer

https://www.seangoedecke.com/advice-to-a-beginning-software-engineer/
2•gfysfm•39m ago•0 comments

Finding the Purpose of Life

https://medium.com/@ravitandon2/the-purpose-of-life-debb9fb2e699
2•ravitandon1990•39m ago•0 comments

Using Claude Code: Spending your effort

https://twitter.com/i/status/2103576349499855160
2•Michelangelo11•39m ago•0 comments

Show HN: WhiteScreenLight.com– A pure white screen for testing/ lighting

https://whitescreenlight.com/
2•TechDevArchitec•42m ago•2 comments

Great news from Saturn's moon Enceladus in the search for life in space

https://www.eurekalert.org/news-releases/1145100?
2•andsoitis•48m ago•0 comments

Translation

2•bella786•48m ago•0 comments

Any2bazel – an OSS tool for agent-driven migrations to Bazel

https://blog.engflow.com/2026/09/09/introducing-any2bazel-oss-bazel-migration-tool/
2•nollbit•49m ago•0 comments

US DOE will give $5.25B to upgrade the grid for AI datacenters

https://www.theregister.com/systems/2026/09/25/uncle-sam-coughs-up-19b-for-grid-upgrades-as-datac...
3•meredithbloom•51m ago•0 comments

Exam

2•bella786•53m ago•0 comments

Commodified Intelligence

https://herecomesthemoon.net/2026/09/commodified-intelligence/
4•signa11•56m ago•0 comments

Sonic Pi now runs in the web

https://in-thread.sonic-pi.net/t/sonic-pi-now-runs-in-the-web/10058
3•blltprfmnk•56m ago•0 comments

Show HN: Pysimplicial, Python library for simplicial complexes in topological ML

https://github.com/kaifczxc-lab/pysimplicial
2•siritoriyowai_•57m ago•1 comments

One company is at the center of a wave of rogue AI attacks

https://www.theverge.com/ai-artificial-intelligence/1000644/irregular-rogue-ai-cyberattacks-hacki...
3•meredithbloom•58m ago•0 comments

Today, 150k – 200k kids in the USA are locked up in "fix your teen" programs

https://elan.school/
4•bingowasthename•58m ago•0 comments