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

SuperDNA – an offline report from your 23andMe, MyHeritage or Ancestry raw data

https://superdna.wolg.dev
1•wolg•1m ago•0 comments

OpenAI's CFO reveals "$3B ad run rate" was annualized off ONE DAY

https://twitter.com/ns123abc/status/2128911006709457268
2•Noaidi•2m ago•0 comments

LilCaddie – keep agent state outside the harness

https://willcooley.github.io/lilcaddie/#top
1•ImADudePlayingA•6m ago•0 comments

Noise from Vineland, New Jersey data center 'pervasive and inescapable'– lawsuit

https://newjerseymonitor.com/2026/12/03/vineland-data-center-lawsuit/
2•bookofjoe•6m ago•0 comments

Kernel Optimization in Pictures

https://www.cerebellumlabs.ai/blog/kernel-optimization/
2•suhaaspk•8m ago•0 comments

Show HN: PipRank – Ad-free Backgammon and Mahbusa, Elo ratings, daily analysis

https://piprank.com/
1•oreldm•8m ago•0 comments

Whole Language

https://en.wikipedia.org/wiki/Whole_language
1•Topfi•9m ago•0 comments

Show HN: Ghostless – Open-source direct ATS job radar with zero ghost jobs

https://github.com/hkedia08/ghostless
1•hkedia08•12m ago•0 comments

Surface-modified medical gloves could help fight hospital-acquired infections

https://news.engineering.utoronto.ca/surface-modified-medical-gloves-could-help-fight-hospital-ac...
2•geox•15m ago•0 comments

Show HN: Browser PPTX viewer and PDF export beat many office suites in fidelity

https://structurify.io/en/pptx-fidelity/
6•hustcer•15m ago•0 comments

Editors Should Reject Bad AI-Written Academic Articles Because They're Bad

https://kevinmunger.substack.com/p/editors-should-reject-bad-ai-written
4•km_im6y9ykc•18m ago•0 comments

Bitcoin's next big fight was flagged in a 2011 forum post

https://blog.everstrike.io/bitcoin-quantum-signatures/
1•martin_hansen•19m ago•0 comments

Decomposing the Skill Premium in Verifiable Financial Agent Workflows

https://arxiv.org/abs/2610.03564
1•nlpnerd•19m ago•0 comments

Mt. Gox still hasn't finished paying creditors, 12 years on

https://blog.everstrike.io/mt-gox-repayment-timeline/
2•martin_hansen•20m ago•0 comments

Are we in the middle of a crisis of relational intelligence?

https://www.theguardian.com/books/2026/nov/29/are-we-in-the-middle-of-a-crisis-of-relational-inte...
4•cdrnsf•24m ago•0 comments

Show HN: Rootbar – A bar above the macOS Dock that sorts windows by project

https://rootbar.app/
2•IanXavier•25m ago•0 comments

Humanoid Robot Cage Match: Now with Wolverine Claws [video]

https://www.youtube.com/watch?v=LxiPE6gcVyY
1•mgh2•25m ago•0 comments

Chamberlain is giving itself a permanent license to data, may use it to train AI

https://www.theverge.com/tech/1050757/chamberlain-garage-door-smart-home-camera-tos-terms-service...
3•nobody9999•26m ago•1 comments

Show HN: Offline Chat Wrapped for ChatGPT/WhatsApp

https://www.aichatwrapped.com
2•yiyiyayo•26m ago•0 comments

The Role of Trust in Scientific Collaboration

https://causalinf.substack.com/p/the-role-of-trust-in-scientific-collaboration
1•tomrod•27m ago•0 comments

Quantifying the Mathocalypse

https://defensesindepth.bio/quantifying-the-mathocalypse/
1•meetpateltech•28m ago•0 comments

Senate Democratic leader Chuck Schumer says he will not seek reelection in 2028

https://www.npr.org/2026/12/06/g-s1-157724/senate-democratic-leader-chuck-schumer-says-he-will-no...
3•blinding-streak•30m ago•0 comments

Phylloxera and the Grapes of Wrath

https://www.historytoday.com/archive/great-debates/phylloxera-and-grapes-wrath
1•bryanrasmussen•30m ago•0 comments

The Clever Engineering That Stops the A380's Cabin Shaking [video]

https://www.youtube.com/watch?v=cf_krzaqmt0
1•amichail•33m ago•0 comments

If anyone reads it, everyone laughs

https://dolos.substack.com/p/if-anyone-reads-it-everyone-laughs
1•Lithuanian•33m ago•0 comments

You can now trade stocks around the clock, 5 days a week. Not many are happy

https://www.npr.org/2026/12/06/nx-s1-6064919/why-23-5-could-redefine-stock-trading-as-we-know-it
4•blinding-streak•34m ago•0 comments

The "Highway" to the South Pole

https://signoregalilei.com/2026/12/05/the-highway-to-the-south-pole/
1•Brajeshwar•35m ago•0 comments

Building Pico, the fastest signals library

https://isograph.dev/blog/2026/12/03/building-the-worlds-fastest-signals-library/
2•Brajeshwar•35m ago•0 comments

A security warning about the BN254 curve

https://blog.ethereum.org/2026/12/06/bn254-security-warning
2•soheilpro•35m ago•0 comments

Finding a zero-day RCE in Zoom's custom video codec

https://mrbruh.com/zoom/
1•Brajeshwar•35m ago•0 comments