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

Data races and the limits of ThreadSanitizer in C and Go

https://theconsensus.dev/p/2026/09/06/data-races-and-the-limits-of-threadsanitizer-in-c-and-go.html
1•matt_d•4m ago•0 comments

India's First AI Agentic E-Commerce Platform

https://www.youtube.com/watch?v=e-Z690c_SLA
1•Shraddha__Singh•4m ago•0 comments

Quantum O(1) Invariants: Redefining Post-Quantum Cryptography

https://zenodo.org/records/22731417
1•GeometryKernel•7m ago•0 comments

Roon: "I think open source will be banned"

https://twitter.com/tszzl/status/2098875417373634944
3•pr337h4m•11m ago•0 comments

Fenton's Reagent

https://en.wikipedia.org/wiki/Fenton%27s_reagent
2•peter_d_sherman•25m ago•0 comments

Early Earth's Aurora may have made a ion-beam reactor for prebiotic chemistry

https://phys.org/news/2026-09-early-earth-auroral-belts-natural.html
2•wglb•29m ago•1 comments

JWST finds extreme star-forming galaxies masquerading as faint quasars

https://phys.org/news/2026-09-jwst-extreme-star-galaxies-masquerading.html
2•wglb•34m ago•1 comments

Show HN: I made an alternative to the archived filebrowser

https://github.com/skidoodle/filebrowser
2•skidoodle•34m ago•1 comments

A wandering black hole caught feeding on the run

https://phys.org/news/2026-08-black-hole-caught.html
2•wglb•38m ago•1 comments

MacFileSizing – What is consuming my disk space?

https://github.com/jaccon/macfilesizing/tree/main
3•jaccon•42m ago•0 comments

Anthropic CEO says AI swarm could 'take over the Internet' in 6-12 months

https://venturebeat.com/security/anthropic-ceo-says-ai-swarm-could-take-over-the-entire-internet-...
6•pseudolus•47m ago•1 comments

Show HN: Aqqai – Every answer, checked before you see it

https://demo.aqqai.in
2•Vineetyadav2•51m ago•1 comments

Kubernetes v1.37 brings 67 enhancements. Which matter for operators?

https://thenewstack.io/kubecon-kubernetes-updates-security/
2•geoffbp•52m ago•0 comments

Every invoice in Brazil's economy runs on SOAP 1.2. We mapped it all

https://github.com/stoix-dev/sefaz-webservices-postman
3•lestx•53m ago•0 comments

The Succession Crisis That Tore England Apart

https://www.historytoday.com/archive/feature/succession-crisis-tore-england-apart
6•pepys•55m ago•0 comments

Aligned to Whom?

https://hyperbo.la/w/aligned-to-whom/
3•lopopolo•56m ago•0 comments

After Math

https://terrytao.wordpress.com/2026/09/12/after-math/
3•throwaway81523•56m ago•0 comments

Ask HN: How can DigitalOcean not afford $50, but can afford $3M to Omarchy?

14•dpmartinez•1h ago•2 comments

Backflip: Apple now wants to train AI models with user data after all

https://www.heise.de/en/news/Backflip-Apple-now-wants-to-train-AI-models-with-user-data-after-all...
3•jacquesm•1h ago•0 comments

Show HN: Astah Pro MCP – Enabling AI-Powered UML Modeling

https://github.com/takaakit/astah-pro-mcp
2•takaakit•1h ago•0 comments

Physicist does the math on Star Trek's "Picard maneuver"

https://arstechnica.com/science/2026/09/physicist-does-the-math-on-star-treks-picard-maneuver/
2•kensai•1h ago•0 comments

Code is free speech (2020)

https://hoffmang9.github.io/free-speech/the-history-code-is-free-speech.html
2•tehlike•1h ago•1 comments

Tim Berners-Lee: I'm interested in Math-what stuff don't we do in School?

https://www.w3.org/People/Berners-Lee/Kids.html
3•nxobject•1h ago•0 comments

U.S. agencies say top Chinese AI companies systematically copied American models

https://www.nbcnews.com/tech/tech-news/us-accuses-china-ai-developers-deepseek-alibaba-copying-am...
3•pseudolus•1h ago•0 comments

Trade war puts spotlight on Canada's relationship with US tech

https://www.cbc.ca/radio/justasking/canada-digital-sovereignty-just-asking-9.7337778
2•pseudolus•1h ago•0 comments

Biggest AI Rivals Agree They Need to Slow It Down

https://www.wsj.com/tech/ai/anthropic-boss-warns-ai-industry-must-slow-the-pace-a4267b56
2•bryan0•1h ago•0 comments

An interesting anecdote from our Hacker Opus work

https://www.lesswrong.com/posts/HE3Styo9vpk7m8zi4/evhub-s-shortform?commentId=fcqxeya5TCnbx5YBa
2•yurivish•1h ago•0 comments

The Interim Computer Museum

https://icm.museum/
38•mulmen•1h ago•4 comments

Apple *deletes* your Apple Music library if you unsubscribe

https://www.reddit.com/r/apple/comments/7niv58/fyi_apple_deletes_your_apple_music_library_if_you/
12•behnamoh•1h ago•3 comments

Can an earnest agreement with AI increase alignmnet. appears to be "YES "

https://www.echohive.ai/a-short-agreement-zero-observed-cheating
3•echohive42•1h ago•0 comments