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

One year of Dioxus fullstack in production: the good, the painful

https://oxidt.com/blog/one-year-of-dioxus-fullstack-in-production-the-good-the-painful
1•hauju•1m ago•0 comments

Orthofoto Map of Vienna

https://stp.wien.gv.at/basemap/#{%22center%22:[1515325.0116354537,6052376.146557523],%22zoom%22:7...
1•plurby•9m ago•0 comments

Summary of Tonight's Exit Polls – Netanyahu doesn't have a majority

https://twitter.com/israel_elects/status/2115178826909024568
2•spzx•10m ago•0 comments

Ossuary HolyC

https://yatovoid.itch.io/ossuary-holyc
1•andsoitis•10m ago•0 comments

Nathaniel Comfort's misguided take on The Selfish Gene at 50

https://whyevolutionistrue.com/2026/10/27/nathaniel-comforts-wonky-take-on-the-selish-gene-at-50/
2•myth_drannon•12m ago•0 comments

Meta launches plan for $95B stock offering to fund AI expansion

https://www.cnbc.com/2026/10/26/meta-stock-offering-ai.html
3•gmays•12m ago•0 comments

Show HN: Talkhawk, Wispr Flow-style dictation for Windows that runs on your PC

https://talkhawk.app/
1•yolovich•15m ago•0 comments

Show HN: Extending Axiom's PrimeGapsLib to prove parts 2 and 3 of Erdős #420

https://erdosproblems.ai/problems/420
1•NatalieTrono•21m ago•0 comments

Show HN: CleanCode – Claude Code and Codex collaborating on one canvas

https://github.com/chen-985211/cleancode
2•Tide-N•23m ago•2 comments

I used to be homeless. That experience shapes my science

https://www.science.org/content/article/i-used-be-homeless-experience-shapes-my-science
2•samizdis•23m ago•0 comments

DuckDB 2.0: Upgrade Now or Wait for 2.0.1?

https://query.farm/blog/duckdb-2-release-activity/
1•rustyconover•24m ago•0 comments

The AGI-pill is specialized robots

https://www.giacomoran.com/blog/agi-pill-specialized-robots/
1•ran3000•25m ago•0 comments

Secret-leak-scan-lite – scan repos for leaked credentials before you commit

https://github.com/NenadZivotic/secret-leak-scan-lite
1•Sone1994•29m ago•0 comments

I put an AI in the Garden of Eden. Then I introduced the serpent

https://www.reddit.com/r/ChatGPT/comments/1xh30mr/i_put_an_ai_in_the_garden_of_eden_then_i/
2•absurdwebsite•29m ago•0 comments

Early progress on accelerating drug development with Claude

https://www.anthropic.com/research/early-progress-drug-development
19•dataking•30m ago•1 comments

Raspberry Pi Zero 3W and Pi 4 Model A spotted in device trees

https://bret.dk/raspberry-pi-zero-3-w-pi-4-model-a/
5•sthlmb•32m ago•1 comments

Silo: Self-hosted media streaming, built on a modern stack

https://siloserver.org
1•mpgirro•34m ago•0 comments

In China, the AI bubble has burst

https://finance.yahoo.com/markets/stocks/articles/analysis-china-ai-bubble-already-120038616.html
10•smurda•36m ago•3 comments

Track all the layoffs happening around the world

https://layoffmap.com/
2•onmyway133•37m ago•2 comments

GM CEO: We're making leaps and bounds toward 'eyes-off, hands-off' driving

https://www.cnbc.com/2026/10/12/cramer-gm-eyes-off-driving-2028.html
2•RickJWagner•41m ago•1 comments

The US AI Labs, Part 2: The Suppliers Are Financing Their Own Customers

https://codingplans.dev/briefs/us-model-labs-part-2/
1•nedsma•44m ago•0 comments

Hex Raises $100M

https://hex.tech/blog/hex-new-era/
2•tomwphillips•44m ago•0 comments

Code-execution flaw in UEFI firmware threatens most servers on planet Earth

https://arstechnica.com/security/2026/10/code-execution-flaw-in-uefi-firmware-threatens-most-serv...
4•DamnInteresting•46m ago•1 comments

Ask HN: How will HN transition to allowing AI writing when society accepts it?

1•amichail•47m ago•4 comments

Bitcoin Puzzle Research: Methods, Research and Lessons from Negative Results [pdf]

https://github.com/escache/bitcoin-puzzle-methods/blob/main/BITCOIN_RESEARCH_METHODS_EXPLAINED.pdf
1•ioevno•48m ago•0 comments

Prometheus collects gift links to paywalled news articles shared by subscribers

https://kottke.org/prometheus/
1•SLHamlet•51m ago•1 comments

iCloudKit Extractor: seven months from an ADP dead end to a public toolkit

https://github.com/GiordanoSconti/iCloudKitExtractor
1•D34dL0ck9327•56m ago•0 comments

The Talkie Persona Library (atlas of neurons in vintage language model)

https://talkieneurons.vercel.app/
1•benbreen•57m ago•0 comments

Books and Specs I enjoyed reading

https://paulocuambe.github.io/posts/reading/
3•gosenx•57m ago•0 comments

Can maths survive AI? Fields medallist Terence Tao calls for a 'Maths 2.0' world

https://www.nature.com/articles/d41586-026-03389-1
1•bookofjoe•58m ago•1 comments