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

Review: Neil Postman's 'Amusing Ourselves to Death' (2016)

https://www.refsmmat.com/posts/2016-01-23-amusing-ourselves-to-death.html
1•jruohonen•3m ago•0 comments

Fundraiser to Bolster Monero's Security Through Automated Testing

https://old.reddit.com/r/Monero/comments/1v8exyy/fundraiser_to_bolster_moneros_security_through/
1•lunarthegrey•4m ago•0 comments

Venture Mindset

https://herbertlui.net/venture-mindset/
1•herbertl•7m ago•0 comments

Show HN: Edge Drop – The clipboard manager Windows 11 should have shipped with

https://github.com/Deepender25/Edge-Drop
2•Deepender25•8m ago•0 comments

Vakonomic Fluids

https://arxiv.org/abs/2607.18312
2•E-Reverance•9m ago•0 comments

Gemini Distillation Service

https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tuning/distillation
2•asawfofor•9m ago•1 comments

Show HN: Gemma 4 26B A4B running on an iPhone 17 Pro via model paging

https://noemaai.com/
1•armin976•11m ago•0 comments

China Begins Making Homegrown DUV Lithography Chipmaking Tools

https://www.reuters.com/world/china/china-begins-making-homegrown-duv-chipmaking-tools-informatio...
2•karakoram•14m ago•0 comments

Trusty Boot Key, a Ventoy Alternative

https://codeberg.org/aol/trusty-boot-key
1•mixmastamyk•16m ago•0 comments

Private Credit Backstop, How Private Equity Socializes Risk Through Insurers [pdf]

https://papers.ssrn.com/sol3/Delivery.cfm/7152239.pdf
1•senshan•16m ago•0 comments

Internet is no longer accessible?

4•cute_boi•17m ago•3 comments

The Forensic Audit of Project 545

https://www.bitchute.com/video/9r7XJ8ykLrhs/
1•untiledsource•21m ago•0 comments

Families in London temporary housing told they cant use inbuilt air conditioning

https://www.theguardian.com/society/2026/jul/27/homeless-families-london-temporary-housing-air-co...
2•stuaxo•21m ago•0 comments

Norway Salmon

https://www.abc.net.au/news/2026-07-28/how-norway-s-salmon-industry-became-a-global-behemoth/1069...
1•CHB0403085482•22m ago•0 comments

Tlbic: A Local Basic Income Proposal Built to Protect Human Dignity (v9.0)

https://drive.google.com/file/d/10YGI27bT6Vj00LlJuKwoaSYzG-cXNbwF/view?usp=drive_link
3•michikawa59•24m ago•1 comments

Gamma-ray pulsations reveal extreme 3.2-ms pulsar 3,900 light-years away

https://phys.org/news/2026-07-gamma-ray-pulsations-reveal-extreme.html
1•wglb•25m ago•1 comments

Residential Proxies Are a National Security Threat

https://jacob.gold/posts/residential-proxies-are-a-national-security-threat/
1•joshbetz•26m ago•0 comments

First Genesis Mission Projects Selected to Boost AI-Driven Scientific Discovery

https://www.energy.gov/articles/secretary-energy-chris-wright-announces-first-genesis-mission-pro...
1•gmays•30m ago•0 comments

Show HN: RL bandits pick coding agent's context,Grok 4.5 out-fixes Fable 5

https://github.com/VinvAI/VinvAI
2•sohamac•33m ago•0 comments

PostgreSQL's MVCC is bad. So is everyone else's

https://boringsql.com/posts/mvcc-bad-bad/
1•soheilpro•37m ago•0 comments

X Money officially launches in the US

https://9to5mac.com/2026/07/27/x-money-apple-wallet/
1•slymax•40m ago•0 comments

Abandoned Navy base costs taxpayers $340k pa for internet no one uses

https://taskandpurpose.com/news/abandoned-navy-base-internet-service/
2•Gaishan•45m ago•0 comments

Lilian Weng Resigns from Thinking Machines Lab

https://digg.com/tech/yhf6ei1b
1•doppp•49m ago•0 comments

Big Tech's Money Men Don't Care About the Backlash

https://www.politico.com/news/magazine/2026/07/26/ai-super-pac-operatives-profile-01008227
2•reasonableklout•52m ago•0 comments

Show HN: _done – Expanding AI Capabilities

https://underscoredone.com/
1•onescales•52m ago•0 comments

S.Korea's KOSPI tumbles nearly 5% as chipmakers slump on AI worries

https://www.reuters.com/world/asia-pacific/skoreas-kospi-tumbles-nearly-5-chipmakers-slump-ai-wor...
4•rvz•53m ago•0 comments

QuickLogic eFPGA IP

https://www.quicklogic.com/efpga-ip/
1•peter_d_sherman•56m ago•0 comments

Tag Universal Machine Pitch Deck [pdf]

https://taguniversal.github.io/digital_blockchain_patents/TAG_Pitch_Deck.pdf
1•taguniversalm•58m ago•0 comments

Velonus – now in beta, with AI triage and one-click fix PRs

https://www.velonus.com/
1•AliAmmar15•1h ago•0 comments

Copyright Scammers Weaponized Meta's Rights Manager with Backdating Exploit

https://torrentfreak.com/copyright-scammers-weaponized-metas-rights-manager-with-backdating-exploit/
2•gslin•1h ago•1 comments