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

NeuronDump: Open a local LLM as a 3D graph, cut parts, see what breaks

https://github.com/aymen94/NeuronDump
1•aymen1994•1m ago•0 comments

Google's privacy policy to use info shared through Personal Intelligence for ads

https://www.androidauthority.com/google-personal-intelligence-privacy-3727111/
1•smurda•2m ago•0 comments

Upwelling – Combining real-time collaboration with version control for writers

https://www.inkandswitch.com/upwelling/
1•andsoitis•2m ago•0 comments

Maker's Schedule, Manager's Schedule

https://paulgraham.com/makersschedule.html
1•andsoitis•3m ago•0 comments

Augmodo Raised Capital to Take Its Employee-CameraBadges Beyond the Retail Floor

https://startupfortune.com/augmodo-raised-21-million-to-take-its-camera-badges-beyond-the-retail-...
2•Baljhin•3m ago•0 comments

Eunice is almost here (William Gibson, Agency)

https://armincat.com/articles/eunice-is-almost-here
2•armcat•5m ago•0 comments

Geneva in 3D and real time with open data

https://geneva3d.ch/
2•sirpilade•12m ago•0 comments

Reclaim disk space with an AI agent

https://github.com/riza/ai-disk-cleanup
1•r1z4•15m ago•0 comments

Moderna and Merck say their mRNA cancer vaccine cut death, recurrence by 42%

https://arstechnica.com/health/2026/10/personalized-mrna-cancer-vaccine-cut-melanoma-death-recurr...
8•_Microft•16m ago•0 comments

"Study history thoroughly" Lithuanian woman to hammer and sickle waving students

https://www.baltictakes.com/italians-praise-lithuanian-womans-open-letter-encouraging-hammer-and-...
2•Teever•18m ago•1 comments

YOD4COINS – Offline-first transaction protocol with adaptive consensus

https://github.com/masondosibongakonke2-blip/yod4coins-core
1•sbongamasondo•25m ago•0 comments

Watching the Watchers

https://watchingthewatchers.github.io/watchingthewatchers/index.html
1•taubek•26m ago•0 comments

Settler attacks, demolitions and roadblocks: A week in the West Bank [video]

https://www.youtube.com/watch?v=lhRXrmg4_6M
2•computerex•27m ago•1 comments

What will computer chips look like in 2045? [Dwarkesh] [video]

https://www.youtube.com/watch?v=frYSOKvNiiE
1•JumpCrisscross•31m ago•0 comments

Against Against Handover

https://www.astralcodexten.com/p/against-against-handover
1•andyjohnson0•32m ago•0 comments

Why I Am a Programmer

https://www.alfie.wtf/programming/why-i-am-a-programmer.html
2•jruohonen•34m ago•3 comments

People are using AI to 'dumb down' their smart TVs. Is that a good idea?

https://www.cbc.ca/news/world/ai-coding-hack-smart-tvs-9.7392179
3•devonnull•35m ago•2 comments

Show HN: Zubspace.gg – remake of 30yo Subspace game, a space MMO in the browser

https://zubspace.gg/
2•elux101•35m ago•0 comments

Gheist campaign plants secret-dumping workflows using stolen GitHub tokens

https://www.wiz.io/blog/gheist-attempted-scaled-abuse-of-stolen-github-tokens-stumbles
2•acossta•35m ago•0 comments

My wellbeing does not depend on my project

https://yapern.com/blog/my-wellbeing-does-not-depend-on-my-project/
2•andrewfromx•41m ago•0 comments

The Ways Rhythm Shapes Our Lives (2023)

https://thereader.mitpress.mit.edu/the-extraordinary-ways-rhythm-shapes-our-lives
2•NaOH•47m ago•0 comments

Where the Romans Fought (interactive map)

https://iosiflazaridis.github.io/battles-of-the-romans/
1•endorphine•47m ago•0 comments

The Question After the Answer: AI prediction and human autonomy

https://aegissolisarchive.org/the-question-after-the-answer/
1•aegissolis•48m ago•0 comments

LimonOS new OS no Unix no Linux

1•DrMoris•49m ago•2 comments

Coma – Paimen (1996) [video]

https://www.youtube.com/watch?v=oHjtmOFrX-k
1•jruohonen•50m ago•0 comments

The Impact of the Great Recession on Mortality: A Dynamic Factor Analysis

https://www.nber.org/papers/w35914
1•paulpauper•51m ago•0 comments

How to promote my non-profit edtech platform?

1•rohansrma•51m ago•6 comments

Human Limits to Growth

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6742738
1•paulpauper•51m ago•0 comments

An American Answer to China's Open Si Models: A Safe Harbor for Open Weights

https://manhattan.institute/article/an-american-answer-to-chinas-open-si-models-a-safe-harbor-for...
1•paulpauper•51m ago•0 comments

AI-Powered Automatic Lockpick Machine [video]

https://www.youtube.com/watch?v=o4AUKGdScNI
1•pingou•53m ago•0 comments