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

Tiny Robots Deliver Treatments to the Brain

https://www.caltech.edu/about/news/tiny-robots-deliver-treatments-to-the-brain
1•gmays•4m ago•0 comments

Show HN: Ramgod – Run MoE LLMs bigger than RAM on an 8GB Mac, 3-5x llama.cpp

https://github.com/Ri4dH/ramgod
1•ri4dh•6m ago•0 comments

Show HN: Understanding FAT16 – an interactive filesystem explainer

https://fat16.asciitweezers.com/
1•giant_fern•8m ago•0 comments

Silently degrading the model's capabilities IS sabotage

https://twitter.com/TimSweeneyEpic/status/2126682647862862063
2•tosh•12m ago•0 comments

GTA VI writer behind female protagonist deletes X account after online hate

https://www.cbc.ca/lite/story/9.7438910
2•DeepLogin•12m ago•0 comments

Good educational games might actually be possible

https://www.robinlinacre.com/maths_games/
1•RobinL•15m ago•0 comments

Nami: Easy declarative package manager for Linux and macOS

https://namios.dev/
11•hjjbjjj•17m ago•0 comments

Objections to .php application being published on ICANN site

https://pub.roddie.digital/3n3aavxi6hc2g
3•rbanffy•18m ago•1 comments

I started writing a book, on coding any interest?

https://github.com/posix4e/growing-verified-systems
3•alexnewman•20m ago•1 comments

How Maldon sea salt flakes are made using imported German rock salt

https://observer.co.uk/news/national/article/revealed-how-maldon-sea-flakes-are-made-using-import...
1•JumpCrisscross•24m ago•0 comments

States with Abortion Bans See Decrease in U.S. MD Senior Residency Applicants

https://www.aamc.org/about-us/mission-areas/clinical-care/post-dobbs-2024
1•thunderbong•24m ago•1 comments

Trump says he 'protected' Musk in first term after 'a tough incident'

https://electrek.co/2026/11/24/trump-protected-elon-musk-first-term-tough-incident/
3•JumpCrisscross•26m ago•0 comments

Orbital Data Centers: Spacecraft Constraints and Economic Viability

https://arxiv.org/abs/2604.27197
1•programd•27m ago•0 comments

Failed Bank Information for United Fidelity Bank, Fsb, Evansville, IN

https://www.fdic.gov/bank-failures/failed-bank-list/united-fidelity-bank-fsb
1•everybodyknows•29m ago•1 comments

Maldon Salt fallout continues as rivals call for change

https://observer.co.uk/news/national/article/maldon-salt-fallout-continues-as-rivals-call-for-change
1•zeristor•30m ago•1 comments

AI Code Review and the Age of Autonomy with James Governor

https://vpetersson.com/podcast/s03e07/
1•mooreds•31m ago•0 comments

Datasette-Charts 0.4a0

https://simonwillison.net/2026/Nov/27/datasette-charts/
1•ac-ciano•32m ago•0 comments

Best Budget GPU for LLM: Buying Used, Consumer, and Older Pro Cards

https://www.gmicloud.ai/en/blog/best-budget-gpu-llm-used-consumer-cards
1•peter_d_sherman•32m ago•0 comments

Whipped 74 times for singing a song

https://www.reuters.com/world/middle-east/irans-flogging-singer-was-warning-anxious-hardliners-in...
2•inshard•33m ago•0 comments

'Heat storms' threaten Arizona's iconic saguaros

https://tucson.com/news/local/environment/article_82a8710a-eb98-4cd0-85eb-278f69abc29a.html
1•geox•33m ago•0 comments

Are You Accumulating Years of Experience?

https://letters.unchartedpathbreakthroughs.com/posts/are-you-accumulating-years-of-experience
1•mooreds•35m ago•0 comments

Pol Pot's Children (1998)

https://www.newyorker.com/magazine/1998/08/10/pol-pots-children
1•yubblegum•35m ago•1 comments

A Complete Course in Quiz Bowl

https://zembla.com/books/
1•samuel246•36m ago•0 comments

Popular e-government platform DIGIT has critical SQL injection bug

https://www.theregister.com/security/2026/11/27/free-e-government-platform-that-serves-two-billio...
1•qtqtqt•37m ago•0 comments

Opair, the coding harness that eschews autonomy

https://www.opairdev.org/philosophy
1•philbo•37m ago•0 comments

Show HN: Guess a London bus route or a World River from its shape on the map

https://guess.streetchallenge.uk/
1•laechoppe•37m ago•0 comments

Tesla Unveils PowerCore: Solid-State Transformer to Replace 130-Year-Old Tech

https://theelectricviking.com/tesla-unveils-powercore-solid-state-transformer-to-replace-130-year...
2•ksec•38m ago•0 comments

I completely restored an IBM ThinkPad 701C laptop from 1995 (2023) [video]

https://www.youtube.com/watch?v=xvyYPVkkztQ
1•tomatofu•39m ago•0 comments

Welcome to the Brain Care Score Assessment

https://braincarescore.com/insights
1•mooreds•39m ago•0 comments

Weight-Space Micromachines: Brain Implants for LLMs

https://papail.io/papers/wsm/
2•ksec•39m ago•0 comments