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

Forensic evidence Chinese AI labs built their newest models on Nvidia Blackwell

https://twitter.com/willdepue/status/2120992457630326841
1•oger•21s ago•0 comments

MMD-071-2026 Linux/KinsingBot a "bad-bad" designed botnet

https://blog.malwaremustdie.org/2026/11/mmd-071-2026-kinsingbot-well-designed.html
1•MalwareMustDie•3m ago•0 comments

MMD-0070-2026 Linux/Hajime (with hexstring tiny ARM ELF fileless spreader)

https://blog.malwaremustdie.org/2026/11/once-upon-time-linuxhajime-hexstring.html
1•MalwareMustDie•5m ago•0 comments

Cloudflare's Use of QuePaxa: A Leaderless Consensus Algorithm for Global Control

https://blog.cloudflare.com/choosing-quepaxa/
1•birdculture•5m ago•0 comments

OpenAI Joins Groundswell of Support for AI Chip Control Measures

https://www.bloomberg.com/news/articles/2026-11-12/openai-joins-groundswell-of-support-for-ai-chi...
1•pretext•5m ago•0 comments

How to claim an SLA credit for today's Microsoft outage

https://www.reddit.com/r/sysadmin/comments/1xuqu5y/microsoft_owes_you_money_for_todays_outage_they/
1•eps•7m ago•0 comments

GPS are now 'prescribing' time in nature. Is it likely to improve your health?

https://theconversation.com/gps-are-now-prescribing-time-in-nature-is-it-likely-to-improve-your-h...
1•defrost•8m ago•0 comments

The day Microsoft went dark

https://onlytech.boo/incident/the-day-microsoft-went-dark-mwenfrl1
1•vednig•9m ago•0 comments

ConvertFlow – All-in-One Video, Audio and Image Converter

https://convertflow.cc
1•wilzons•9m ago•0 comments

Show HN: Talgent Workbench – Open-source managed agent platform you run yourself

https://github.com/talgent-work/workbench
1•jacexh•9m ago•0 comments

Show HN: Pac-Man, but You're the Ghost

https://garritfra.github.io/pac-hunt/
1•garritfra•10m ago•0 comments

The Shadowy World of Eurasian Organized Crime

https://intpolicydigest.org/the-shadowy-world-of-eurasian-organized-crime/
1•bryanrasmussen•10m ago•0 comments

AI Ambition: ArtCraft Cloned Photoshop and Now Wants to "Rebuild Everything"

https://latent.space/p/artcraft/
1•adunk•10m ago•0 comments

Runitlocal.io – Run AI on your own hardware

https://runitlocal.io/
1•rzk•11m ago•0 comments

I created an infinitely generated radio show

https://voca.watch/
1•salakar•14m ago•1 comments

Fixing a WebKit bug to see if promises are made of train tracks

https://alistair.sh/thenables
2•alistaiir•18m ago•0 comments

Show HN: No Microsoft 365? Get your work done on my simulated typewriters

https://typewriter.foxipso.com/
1•IAmNotACellist•21m ago•0 comments

Global warming may have halted an emerging Ice Age, study suggests

https://phys.org/news/2026-10-global-halted-emerging-ice-age.html
1•duck•24m ago•0 comments

247A, Notes 4: Weighted estimates and pseudodifferential operators

https://terrytao.wordpress.com/2026/11/12/247a-notes-4-weighted-estimates-and-pseudodifferential-...
1•smilelamp•26m ago•0 comments

For Silicon Valley leaders, cozying up to the Trump administration was a mistake

https://www.theatlantic.com/ideas/2026/11/silicon-valley-trump-administration/689360/
4•e2e4•33m ago•1 comments

A $5.7T Face-Plant

https://www.theatlantic.com/technology/2026/11/jensen-huangs-icarus-complex/689393/
1•petethomas•34m ago•1 comments

PancakeSlicer: Self-hostable and non-planar slicer for 3D Printing

https://github.com/ZimengXiong/PancakeSlicer
1•danielepolencic•35m ago•0 comments

JSON Is Lying to You

https://blog.gaborkoos.com/posts/2026-08-03-Your-JSON-Is-Lying-to-You/
1•fagnerbrack•36m ago•1 comments

Show HN: Wonderchat – A Zendesk alternative that doesn't charge per seat

https://wonderchat.io/
3•walkingsunrise•37m ago•1 comments

Secure Exclaves and Ambient Sensing

https://security.apple.com/blog/secure-exclaves/
1•nnx•37m ago•0 comments

The Miracle Cure: In 1977, a drug rejected by doctors became a sensation

https://slate.com/technology/2026/11/doctor-medicine-cancer-cure-pill-history.html
1•mutexjp•38m ago•0 comments

Show HN: LinkBunny Shooter

https://linkbunnyshooter.com/
1•hboon•44m ago•0 comments

Show HN: Zero-axiom Lean 4 proof of Yang–Mills R^4 defect via Peano arithmetic

https://github.com/Dr-Logvinovich/round-square
3•DRLogvinovich•49m ago•0 comments

Introducing: Qualiaphobic AI – By Erik Hoel

https://www.theintrinsicperspective.com/p/introducing-qualiaphobic-ai
1•RebelPotato•59m ago•0 comments

The White House is apparently a popular residential proxy exit spot

https://www.theregister.com/security/2026/11/05/the-white-house-is-apparently-a-popular-residenti...
2•noorsimar•1h ago•1 comments