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

Claude Tag: How to Build Your Own Slack AI Agent

https://www.arcade.dev/blog/claude-tag-build-slack-ai-agent/
1•manveerc•48s ago•0 comments

Show HN: Glasshouse – A privacy-first news app with on-device personalization

https://www.roserug.co/products/glasshouse
1•roserugco•53s ago•0 comments

Show your hands honor for the power they bring you

https://aresluna.org/show-your-hands-honor/
1•matthberg•2m ago•0 comments

ParallelKernelBench: Can LLMs write fast multi-GPU kernels?

https://github.com/togethercomputer/ParallelKernelBench
1•matt_d•2m ago•0 comments

Apple Explains Why It Raised Prices on These 14 Products Today

https://www.macrumors.com/2026/06/25/apple-explains-why-it-raised-prices/
1•tosh•3m ago•0 comments

VibeToContent: Marketing Content for Builders

https://vibetocontent.com/
1•javierluraschi•4m ago•0 comments

The biggest problems in using AI

https://shearer.org/research/addressing-biggest-problems-in-ai/
1•smartmic•4m ago•0 comments

Em Dash Counter: A browser extension that counts em dashes

https://mattnite.net/blog/em-dash-counter/
1•speckx•4m ago•0 comments

Linear elastic caching reduced Spanner's memory use by 15.5%

https://research.google/blog/optimizing-cloud-economics-with-linear-elastic-caching/
1•p_stuart82•4m ago•0 comments

Our $8M Seed Round and Open Beta

https://www.sazabi.com/blog/seed-round
1•shcallaway•5m ago•0 comments

The AI-Tutor Revolution That Wasn't

https://www.theatlantic.com/ideas/2026/06/ai-tutor-education-human-investment/687678/
2•Brajeshwar•5m ago•0 comments

Apple's Skating in the Right Direction, but the Puck Is Still Ahead

https://reviews.ofb.biz/safari/article/1429.html
1•trbutler•7m ago•0 comments

I Fine-Tuned an AI Model on My Mac for Less Than a Cent, and You Can Too

https://medium.com/@deshpandetanmay/i-fine-tuned-an-ai-model-on-my-mac-for-less-than-a-cent-and-y...
1•tanmaydesh5189•8m ago•0 comments

Garry Tan: Put a Leash on Your YC Founders

https://twitter.com/looksmaxxvc/status/2069967113947885839
3•mellosouls•10m ago•1 comments

Why electric car batteries last much longer than researchers thought

https://www.sciencenorway.no/battery-cars-and-traffic-transport/electric-car-batteries-last-much-...
2•dxs•11m ago•0 comments

InfiniteDiffusion: A new approach to infinite generation with diffusion models

https://twitter.com/xandurglar/status/2070179038417821777
1•LorenDB•13m ago•1 comments

Using Claude Code makes you a worse developer, but a slightly better manager

https://evgeniipendragon.com/posts/managing-claude-code-made-me-a-better-tech-lead/
1•speckx•14m ago•0 comments

Maybe "is AI a bubble?" is the wrong question

https://emilesilvis.com/maybe-is-ai-a-bubble-is-the-wrong-question.html
2•gmays•15m ago•2 comments

Apple to Skip High-End M6 Mac Chips in Favor of AI-Focused M7 Line

https://www.bloomberg.com/news/articles/2026-06-25/apple-to-skip-high-end-m6-mac-chips-to-launch-...
4•mfiguiere•17m ago•0 comments

Feistel Cipher

https://en.wikipedia.org/wiki/Feistel_cipher
1•tosh•18m ago•0 comments

Using the Red Pitaya STEMlab 125-14 Pro Gen2 as an SDR in GNU Radio

https://www.controlpaths.com/2026/06/21/red-pitaya-stemlab-sdr-gnuradio/
1•hasheddan•19m ago•0 comments

Ask HN: Quickbooks Alternative?

2•bix6•20m ago•0 comments

The AI Data-Center Boom Is Sparking a Third Wave of Inflation

https://www.wsj.com/economy/the-data-center-boom-is-sparking-a-third-wave-of-inflation-926adc6e
4•gmays•21m ago•0 comments

CSS on the ESP32

https://hackaday.com/2026/06/25/css-on-the-esp32/
1•arbayi•22m ago•0 comments

Claudecaine

https://bfontaine.net/blog/2026/06/25/claudecaine/
1•hk__2•22m ago•0 comments

Distro Fighter

https://distrofighter.com/
1•FergusArgyll•23m ago•0 comments

The Exhaustion of Talking to a Tool

https://ohadravid.github.io/posts/2026-06-tool-talking/
1•ohr•23m ago•0 comments

Older tech workers are tapping out early

https://www.seattletimes.com/business/local-business/older-tech-workers-are-tapping-out-early-her...
7•root-parent•24m ago•0 comments

Zines were used to sentence protesters to decades in prison

https://www.theguardian.com/us-news/ng-interactive/2026/jun/24/prairieland-texas-ice-protests-zines
3•Teever•24m ago•1 comments

The negative impacts of fruit juices and other sugary treats for children

https://www.independent.co.uk/news/health/juice-sugar-children-risks-high-blood-pressure-b3001510...
1•theanonymousone•24m ago•0 comments