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

Legbar – live AI agent sessions beside GitHub CI, in one terminal

https://github.com/gmhoward9289-ops/legbar
2•gmhoward9289•5m ago•0 comments

Redis uses less RAM than you think, nibble measures how much, and applies it

https://github.com/RyanRana/nibble
2•ryanrana•14m ago•0 comments

Anthropic's 'Watermark' Text Adulteration in Claude Is a Perversion of Writing

https://daringfireball.net/2026/08/anthropics_watermark_text_adulteration_in_claude_is_a_perversi...
7•ropbear•17m ago•2 comments

Claude Seems Down

20•zhan_eg•18m ago•12 comments

Failure Takes Years to Admit

https://julienreszka.com/blog/failure-takes-years-to-admit/
2•julienreszka•19m ago•0 comments

Claude Is Down

https://claude.ai/new
25•nabeards•19m ago•16 comments

Nauru, the 3rd-smallest country, changes its name to Naoero

https://abcnews.com/International/wireStory/nauru-worlds-3rd-smallest-country-naoero-135318134
2•gmays•28m ago•0 comments

Winkeys: Windows Keyboard Shortcuts on macOS

https://winkeys.app
1•yashvadaria•29m ago•0 comments

Show HN: One page per betting market – 21 books' odds, every outcome graded

https://prop-line.com/odds-api
1•rquitzo243•29m ago•0 comments

How to build a RAG pipeline with the Go StdLib

https://blog.devgenius.io/stop-stuffing-your-system-prompts-build-a-real-rag-pipeline-in-go-e93bb...
2•cheikhdev•29m ago•0 comments

Wellington second-hand bookstore's mysterious orders

https://www.rnz.co.nz/life/books/wellington-second-hand-book-store-s-mysterious-orders
2•beanaroo•30m ago•0 comments

My Hermes and Obsidian Setup and Use Cases

https://metedata.substack.com/p/013-my-hermes-and-obsidian-set-up
1•young_mete•30m ago•0 comments

Awesome-local-first – A curated list of Local-First Software

https://github.com/zhongkechen/awesome-local-first
2•peter_d_sherman•32m ago•0 comments

Productivity Framework Paraiso

https://ejlabs.io/blog/introduction_paraiso
1•mansi1010•32m ago•2 comments

Three Mile Island Accident

https://en.wikipedia.org/wiki/Three_Mile_Island_accident
2•js2•34m ago•0 comments

Life with Hazard Ratios

https://dynomight.substack.com/p/hazard-ratios
1•paulpauper•35m ago•0 comments

AI #176 Part 2: Plan B

https://thezvi.substack.com/p/ai-176-part-2-plan-b
1•paulpauper•36m ago•0 comments

Ask HN : Why Did Stripe Acquire OpenRouter For 7B?

https://s-1.vercel.app/posts/why-openrouter-can-be-the-next-great/
6•nbcu1985•36m ago•0 comments

The Decline of Deviance 2

https://www.experimental-history.com/p/the-decline-of-deviance-2
1•paulpauper•37m ago•0 comments

Young People Hate AI CEOs So Passionately That It's Almost Hard to Believe

https://futurism.com/artificial-intelligence/young-people-ai-ceos-executives-poll
3•healsdata•37m ago•0 comments

America's Loneliness Trap

https://slate.com/life/2026/08/men-lonely-social-skills-therapy-economy-crisis.html
2•theriddlr•38m ago•0 comments

The 'Fraud Squad' at Caltech Will Catch You If You Lie on Your Application

https://www.wsj.com/us-news/education/college-admissions-caltech-cheating-fraud-squad-f7627aab
2•apparent•39m ago•0 comments

Prediction Firms Are Flagging Insider Traders. Many Will Not Face Charges.

https://www.nytimes.com/2026/08/12/us/politics/prediction-markets-insider-trading.html
2•bookofjoe•42m ago•2 comments

Stop Turning every purchase into a tip request

https://www.foxnews.com/opinion/america-needs-stop-turning-every-purchase-uncomfortable-tip-request
7•gist•42m ago•1 comments

Who needs a dedicated portable music player in 2026?

https://kevinboone.me/pmp.html
2•ingve•42m ago•0 comments

Trump Family World Liberty Financial Gets Preliminary Approval to Launch a Bank

https://www.wsj.com/finance/trump-familys-world-liberty-financial-gets-preliminary-approval-to-la...
2•ourmandave•44m ago•0 comments

OEIS Open: A benchmark of 492 unsolved math conjectures, formalized in Lean

https://arxiv.org/abs/2608.11941
1•tadamcz•44m ago•0 comments

Show HN: VocalCode – push-to-talk dictation for AI coding agents, on-device

https://vocalcode.app/
1•wudmaing00•50m ago•0 comments

A faster way to calculate the day-of-the-week

https://www.benjoffe.com/fast-day-of-week
1•gavide•50m ago•0 comments

Don't blame Claude – It's me, I'm the problem, it's me

https://www.atomic14.com/2026/08/16/its-me-hi-im-the-problem
2•iamflimflam1•53m ago•0 comments