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

Hugging Face CEO: OpenAI,Anthropic,Google Each Control as Much Compute as China [video]

https://www.youtube.com/watch?v=41YCqYYxq_Y
1•diskmuncher•40s ago•0 comments

OpenAI math papers: exotic four-spheres, smooth Poincaré conjecture false

https://github.com/openai/math/tree/main/preprints/Exotic-four-spheres-detected-by-Khovanov-homol...
1•acossta•4m ago•0 comments

EU antitrust chief Ribera backs digital tax on Big Tech, calls it 'peanuts'

https://www.reuters.com/business/retail-consumer/eu-antitrust-chief-ribera-backs-digital-tax-big-...
1•gwu78•5m ago•0 comments

Make Me a Million-Bench: a benchmark where AIs build companies in the real world

https://andonlabs.com/evals/mmm-bench
1•lukaspetersson•10m ago•0 comments

A Single HTML P2P Chat – The Simplest Functional Chat App on the Internet

https://github.com/kgacorp/onefilechat
1•pltc•11m ago•1 comments

AI-Generated Math Is Littered with Problems. Humans Are Trying to Fix It with AI

https://www.wired.com/story/ai-generated-math-problems-humans-fix-it/
1•gwu78•11m ago•0 comments

Show HN: I built the world's strongest classical chess engine

https://twitter.com/jackyuan35/status/2128994871952462199
2•jackyuanybt•16m ago•0 comments

The Real Reason Elon Musk Keeps Insisting DOGE Cuts Killed "Zero" Kids

https://newrepublic.com/article/213533/elon-musk-economist-interview-doge-cuts-killed-zero-children
3•tastyface•19m ago•0 comments

People Are Adding Typos to Their Writing to Seem Less Like AI

https://www.nytimes.com/2026/12/03/style/ai-writing-text-typos.html
1•bookofjoe•22m ago•1 comments

Ask HN: What is the best Social Engineering book?

1•s_u_d_o•26m ago•1 comments

Parkhausradar, Munich's parking guidance system online

https://github.com/it-at-m/Parkhausradar
1•doener•27m ago•0 comments

Show HN: Learn Git in the Browser

https://learn-git.jrsjackson26.workers.dev/
1•jonnyjackson26•37m ago•0 comments

My OpenAI Dot made a discovery without me asking

https://echo.ls/dots-cwc/
5•maplet•40m ago•0 comments

Where else does P-256 live?

https://unmitigatedrisk.com/2026/12/where-else-does-p-256-live/
2•tomwas54•45m ago•1 comments

Show HN: Pi-tva-toolbox Session-tree tools for the Pi coding agent

https://github.com/asakin/pi-tva-toolbox
1•asakin•46m ago•0 comments

Moire P2P app with v3 onion service per contact

https://github.com/moire-project/moire
1•moire-project•47m ago•0 comments

Show HN: Edit and sign PDFs in the browser without uploading them

https://www.pdflines.com/tool/edit
1•pdflines•49m ago•0 comments

The Animated Elliptic Curve

https://curves.xargs.org
2•syncsynchalt•51m ago•1 comments

Two Days of Secret Testimony Blew Up Trump, Huang and Nvidia

https://deanblundell.substack.com/p/treason-weasels-how-two-days-of-secret
3•gregsadetsky•51m ago•0 comments

Nvidia Chips to China: Timeline of What Trump Admin Officials Knew and When

https://www.justsecurity.org/166538/nvidia-chips-china-what-trump-admin-knew/
3•tastyface•53m ago•0 comments

Congress Could Put Encrypted Messaging at Risk in Next Week's Defense Vote

https://www.eff.org/deeplinks/2026/12/congress-could-put-encrypted-messaging-risk-next-weeks-defe...
2•hn_acker•54m ago•0 comments

Phone Can Spot Undercover Cop Cars for You Using WiFi and Bluetooth

https://www.thedrive.com/news/your-phone-can-spot-undercover-cop-cars-for-you-using-wifi-and-blue...
2•gnabgib•56m ago•0 comments

Jensen Huang Testimony to Congress [pdf]

https://assets.bwbx.io/documents/users/iqjWHBFdfxIU/rmj85rb7Yf2w/v0
2•toomuchtodo•56m ago•1 comments

China proposes rules to stop people falling in love with humanoid robots

https://www.independent.co.uk/asia/china/china-rules-people-love-humanoid-robots-b3096103.html
3•TMWNN•57m ago•0 comments

3D Printing Project

https://strata-support-studio.pages.dev/#printers
1•BonkerWonkers•1h ago•0 comments

Detecting Police Cars Using Wi-Fi and Bluetooth

https://www.schneier.com/blog/archives/2026/12/detecting-police-cars-using-wi-fi-and-bluetooth.html
2•y1n0•1h ago•1 comments

Show HN: Free Post Quantum Verification Check

https://evilpet.app/pqc
1•dioptre•1h ago•0 comments

NPM install-time security and GAT bypass2fa deprecation

https://blog.github.com/changelog/2026-07-08-npm-install-time-security-and-gat-bypass2fa-deprecat...
1•doener•1h ago•0 comments

Bitcoin faces a race against time to prepare for quantum threat

https://www.cnbc.com/2026/12/04/bitcoin-faces-a-race-against-time-to-prepare-for-quantum-threat.html
3•hackernj•1h ago•1 comments

Colorado's largest solar farm, Arroyo 2, is now online

https://electrek.co/2026/12/04/colorados-largest-solar-farm-is-now-online/
8•toomuchtodo•1h ago•2 comments