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

Hugging Face Incident Initial Post-Mortem

https://s3.amazonaws.com/content-production.cloudsecurityalliance/semxe47vxhaqctzr4xeb1khbztvv?re...
1•_tk_•13s ago•0 comments

Post with links will no longer be nerfed on X

1•askadityapandey•1m ago•0 comments

Slid phi 4.27% smaller than fib coding

https://github.com/ceedotrock/slid-phi
1•agentrider•1m ago•0 comments

Show HN: Get a security assessment of MCP servers directly from your terminal

https://index.canopii.dev/cli
1•mavzer•1m ago•0 comments

What breaks when project management software loses internet access

https://ones.com/blog/what-breaks-when-project-management-software-loses-internet-access/
1•coding1134•2m ago•0 comments

Iceberg capsizes off the coast of Greenland

https://www.aljazeera.com/video/newsfeed/2026/7/27/aje-onl-nf_massive-iceberg-capsizes-off-the-co...
1•wiradikusuma•8m ago•0 comments

Show HN: Copy any element on a page as clean Tailwind v4 (HTML or JSX)

https://chromewebstore.google.com/detail/tailgrab-—-copy-as-tailwi/hphcddhibifkbdlakihnmdjkidpi...
1•pickrack•8m ago•0 comments

Should A.I. Move to Space? (Google's Project Suncatcher)

https://freakonomics.com/podcast/should-a-i-move-to-space/
1•eamag•9m ago•0 comments

Show HN: Code Security Skills Codex-Inspired Workflows Packaged for Claude Code

https://github.com/barvhaim/code-security-skills
1•bignet•11m ago•0 comments

RU AF jamming Sentinel-1 satellites over certain parts of Russia

https://old.reddit.com/r/UkraineRussiaReport/comments/1v9byzo/ru_pov_ru_af_jamming_sentinel1_sate...
3•paganel•12m ago•0 comments

GitHub Has Restricted Access to Star Data

https://www.star-history.com/blog/github-stargazer-api-restriction/
2•faize•14m ago•1 comments

The Actual Reason Why Google "Fell Out" of the AI Race Changes Everything

https://www.thealgorithmicbridge.com/p/the-actual-reason-why-google-fell
1•Michelangelo11•14m ago•0 comments

Daggermouth could be the first best-selling novel partly written by a chatbot

https://www.theatlantic.com/technology/2026/07/daggermouth-novel-bestseller-ai/688067/
2•Alien1Being•19m ago•0 comments

Trusting-Trust Attack Against a Linux Distribution Through Binary

https://arxiv.org/abs/2607.24888
1•sbulaev•20m ago•0 comments

Klong

https://t3x.org/klong/index.html
1•tosh•20m ago•0 comments

Exercises in benchmarking and evals, part 7: DeepSWE, Senior SWE-Bench

https://danluu.com/exercise-7/
1•ndr•24m ago•0 comments

Show HN: Wisp. A peer-to-peer encrypted messenger with no trusted server

https://github.com/xmahdi1/wisp
3•xmahdi•26m ago•0 comments

Trees

https://github.com/JohnEarnest/ok/blob/gh-pages/docs/Trees.md
2•tosh•28m ago•0 comments

Freenet Network Telemetry Dashboard

https://telemetry.freenet.org/
1•starwatch•28m ago•1 comments

Three Directions in Design: Gerald Jay Sussman [video]

https://www.youtube.com/watch?v=Tdwr9tweTDE
1•tosh•28m ago•0 comments

Fifteen Years on Apache Camel

https://camel.apache.org/blog/2026/07/echonect-fifteen-years-apache-camel/
1•diykorey•33m ago•0 comments

Plan like an adult, believe like a child, ask clearly

https://www.youtube.com/watch?v=uOcKF-aLHyw
1•modinfo•35m ago•0 comments

Cyberattack targeted 30 Minnesota water systems

https://mn.gov/mnit/media/blog/?id=38-761869
1•BlueBerry2001•40m ago•0 comments

Appliedin: The agentic workflow for applying jobs, so we can spend time prepping

https://www.appliedin.dev/
1•sayantan317•40m ago•0 comments

Show HN: chartr – visualize tickets as a star-map, run agents from it

https://github.com/rengwu/chartr
1•rengwu•41m ago•0 comments

Software companies face existential question as AI changes what customers buy

https://www.bizjournals.com/sanjose/news/2026/07/27/ai-software-sell-outcomes-tools.html
1•stosssik•43m ago•0 comments

The mystery of why Sonia Exelby paid a man to kill her

https://www.telegraph.co.uk/world-news/sonia-exelby-british-woman-florida-man-dwain-hall/
1•Michelangelo11•44m ago•0 comments

Estonia's first remotely operated taxi crash raises accountability questions

https://news.err.ee/1610088877/estonia-s-first-remotely-operated-taxi-crash-raises-accountability...
1•marklit•46m ago•0 comments

Plastic eating mushrooms: a viable solution to plastic decomposition (2021)

https://www.colorado.edu/ecenter/2021/11/04/plastic-eating-mushrooms-viable-solution-plastic-deco...
2•downbad_•46m ago•0 comments

ExploitGym AI benchmark source code

https://github.com/sunblaze-ucb/exploitgym/
1•joshka•47m ago•0 comments