frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Any good tools to pgdump multi tenant database?

3•polishdude20•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo ago
Oh yes I agree with you. It may become a big push to convince my org to do that

The US is on the verge of losing its measles elimination status

https://apnews.com/article/us-measles-elimination-mexico-6f0bc8f7ef31d5ef82492e42ccb38e47
3•divbzero•4m ago•0 comments

Advertisements for Creator Studio, every single time you go to create a new doc

https://old.reddit.com/r/MacOS/comments/1qphsoh/microslop_now_available_in_apple_pages/
1•felixding•11m ago•0 comments

Writing iOS XCTests in Rust

https://simlay.net/posts/2026-01-rust-xctesting/
1•simlay•12m ago•0 comments

Show HN: Cc-sessions – Fast CLI to list and resume Claude Code sessions

https://github.com/chronologos/cc-sessions
1•Chronologos•19m ago•1 comments

High performance, open source RAFT clustered database: RooDB

https://github.com/jgarzik/roodb
1•jgarzik•19m ago•0 comments

Microsoft's Azure Linux

https://github.com/microsoft/azurelinux
2•AbuAssar•25m ago•0 comments

Show HN: DreamsJar – A visual savings goal tracker for iOS

https://olddogdevs.us/dreamsjar
2•zakmcintyre•28m ago•1 comments

Microblogging from Your Terminal

https://tinyblog.page/
2•vsaravind007•29m ago•1 comments

Brandon Sanderson just sold his Cosmere universe to Apple TV

https://www.polygon.com/brandon-sanderson-tv-adaptations-cosmere-apple/
2•vidyesh•29m ago•1 comments

Tauri vs. Iced vs. egui: Rust GUI framework performance comparison

http://lukaskalbertodt.github.io/2023/02/03/tauri-iced-egui-performance-comparison.html
1•auraham•30m ago•0 comments

Natural Opinions

https://www.bobbytables.io/p/natural-opinions
1•btables•33m ago•0 comments

iMessage API that can obtain user's real-time location

https://twitter.com/photon_hq/status/2009336362827395493
2•RyanZhuuuu•34m ago•0 comments

Reinforcement learning for humans – Quiz your understanding

https://cramsandwich.com
1•filepod•37m ago•0 comments

Building user interactivity on your website without a back end

https://nekomimi.leaflet.pub/3m6pcklmvt222
1•mefengl•39m ago•0 comments

Astrological CPU Scheduler

https://github.com/zampierilucas/scx_horoscope
1•fratellobigio•40m ago•0 comments

Show HN: Cuttlefish – 40ns causal consistency using algebra instead of consensus

https://github.com/abokhalill/cuttlefish
1•yousef06•40m ago•0 comments

Sheetsandbox: Use Google Sheets as a Database for MVPs

https://sheetsandbox.com/
2•aravindkumarv•42m ago•1 comments

Can AI companies become profitable?

https://epoch.ai/gradient-updates/can-ai-companies-become-profitable
5•todsacerdoti•45m ago•2 comments

Glymphatic system clears amyloid beta and tau from brain to plasma in humans

https://www.nature.com/articles/s41467-026-68374-8
1•jmount•45m ago•0 comments

Everyone Has Email. Nobody Uses It Right

https://kaplich.me/essays/email
1•skaplich•49m ago•1 comments

Fault Tolerant Linux

https://popcornlinux.org/fault-tolerant-linux/
1•doener•51m ago•0 comments

Live Lightning Map

https://map.blitzortung.org
1•kristianpaul•52m ago•0 comments

Providing 99.999% of Availability for Unmatched Server Uptime

https://www.penguinsolutions.com/en-us/products/stratus-ftserver
1•doener•54m ago•0 comments

Landholder vs. Stockholder

https://aeon.co/essays/why-hume-is-better-at-explaining-modern-capitalism-than-marx
2•bryanrasmussen•56m ago•0 comments

We can't send mail farther than 500 miles (2002)

https://web.mit.edu/jemorris/humor/500-miles
51•giancarlostoro•59m ago•6 comments

ESR on LLM Coding

https://twitter.com/esrtweet/status/2016713740658344301
1•tiahura•59m ago•0 comments

FOSDEM 2012 Schedule Chart

https://rgbcu.be/dump/fosdem/2012
1•RGBCube•1h ago•0 comments

AI Prompt to Write in Minimalist Style of Ernest Hemingway

https://tools.eq4c.com/ai-prompts/ai-prompt-to-write-in-minimalist-style-of-ernest-hemingway/
2•eq4c•1h ago•0 comments

Show HN: The Unix compress algorithm with approximate matches

1•keepamovin•1h ago•0 comments

Stratus VOS

https://en.wikipedia.org/wiki/Stratus_VOS
1•doener•1h ago•0 comments