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

Build your own Devin in one prompt

https://github.com/cayu-dev/cayu
1•nurazem•1m ago•0 comments

Monsanto's Cruel, and Dangerous, Monopolization on American Farming (2008)

https://www.vanityfair.com/news/2008/05/monsanto200805
1•kamaraju•1m ago•0 comments

California may gut state net neutrality law to comply with Trump admin demand

https://arstechnica.com/tech-policy/2026/09/california-may-gut-state-net-neutrality-law-to-comply...
1•rsingel•4m ago•0 comments

Overlord – a trust kernel for AI agents

https://github.com/B1tR0n1n/overlord
1•b1tr0n1n•4m ago•0 comments

PickiPedia: Artifical_Dumb

https://pickipedia.xyz/wiki/PickiPedia:Artifical_Dumb
1•jMyles•7m ago•0 comments

RL Is Everything, Everywhere, All at Once

https://skypilot.ai/blog/rl-everything
2•covi•18m ago•1 comments

Show HN: Pqp, an open-source Discord alternative with watch parties

https://github.com/rafaelcg/pqp
1•rafgg•21m ago•0 comments

Ctenophores: Wonders of Biology

https://www.quantamagazine.org/ctenophores-arent-just-beautiful-theyre-biological-wonders-20260916/
2•randomImmigrant•23m ago•0 comments

Understanding Why You'd Use Effect TS

https://cm.xyz/blog/understanding-why-youd-use-effect-ts
3•handfuloflight•24m ago•0 comments

Show HN: Spendalyst – tells you when a recurring charge changes price

https://app.spendalyst.com/demo
1•Fsmith10•26m ago•0 comments

CV Forge – tailor your resume to any job with AI

https://shop.lumnika.com/compliancesnap/
1•deusautoai725•28m ago•0 comments

Where Rust Ends and the Kernel Begins

https://cacm.acm.org/blogcacm/where-rust-ends-and-the-kernel-begins/
1•sohkamyung•30m ago•0 comments

Mission Kit

https://missionkit.io/
2•dadado•34m ago•1 comments

Evaluating S2S Model Quality with Human Preference Data

https://research.withdavid.ai/blog/st-s2s-eval
1•EliasLittle•39m ago•0 comments

"Start with a Monolith" Was Good Advice. AI Is Changing That

https://medium.com/scalar-engineering/architecture-in-the-ai-era-part-1-summary-start-with-a-mono...
2•feeblefakie•40m ago•1 comments

Snap launches $2,195 Specs smart glasses

https://finance.yahoo.com/technology/article/snap-launches-2195-specs-smart-glasses-234000058.html
3•geoffbp•41m ago•0 comments

DeepSeek-v4.1 Flash: Pushing the Limits of KV Cache Compression

https://zartbot.github.io/blog/model_arch/dsv41flash_arch/en.html
2•mfiguiere•41m ago•0 comments

What regulatory capture actually looks like

https://marginalrevolution.com/marginalrevolution/2026/09/what-regulatory-capture-actually-looks-...
2•maxutility•42m ago•1 comments

Tin: full-text search for Postgres

https://planetscale.com/blog/introducing-tin
3•gtCameron•47m ago•0 comments

Part-human part-mouse brain developed in science breakthrough

https://www.bbc.com/news/articles/c60m3k28j81mo
2•marc__1•48m ago•0 comments

Show HN: FastRecall, ultra-cheap memory across AI models

https://fastrecall.ai/
1•tomrose•49m ago•0 comments

Michael Burry slams OpenAI, Anthropic for 'self-serving' calls to slow AI

https://nypost.com/2026/09/14/business/big-short-trader-michael-burry-slams-openai-anthropic-for-...
13•nsagent•50m ago•0 comments

Spanish data watchdog publicises first AI agent-linked data breach report

https://www.reuters.com/business/spanish-data-watchdog-publicises-first-ai-agent-linked-data-brea...
2•geoffbp•52m ago•0 comments

Xcode-Project-Format

https://github.com/apple/xcode-project-format
2•interpol_p•53m ago•0 comments

Flowchart: How pixels become an Apple Reference Image

https://claude.ai/artifact/BcyyGRDRimvZgza7d9ts1c
2•alwillis•59m ago•0 comments

Supply Chain Compromise of Korean-Language Windows 11 Installation Media

https://www.logpresso.com/en/blog/2026-09-08-windows11-report-eng
2•ledoge•1h ago•1 comments

Pangram – AI detector for text and images

https://www.pangram.com
1•doodlesdev•1h ago•0 comments

Migrating the GitHub Copilot Runtime to Rust, Using Copilot

https://github.blog/ai-and-ml/generative-ai/migrating-the-github-copilot-runtime-to-rust-using-co...
4•abraham•1h ago•1 comments

Game UI Database

https://www.gameuidatabase.com
2•andsoitis•1h ago•0 comments

Found a B2B billing stack for my agency that doesn't feel like 2010

https://cordhq.app/
1•andrevalleo•1h ago•0 comments