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

MailCheap: Self-hosted newsletters on Amazon SES. About $0.10 per 1k emails

https://github.com/marclou/mailcheap
1•tosh•1m ago•0 comments

Tom Brown used GOP ties to broker a $1.25B/month SpaceX compute deal

https://wsj.com/tech/ai/tom-brown-athropic-669005ad
1•utiiiD•3m ago•0 comments

The Missing Piece in Rust Error Handling

https://mcmah309.github.io/posts/the-missing-piece-in-rust-error-handling/
1•lukastyrychtr•4m ago•0 comments

Enzo's – AI home search that shows cap rate and flags overpriced homes

https://enzos.ai/
1•nicomontuschi•4m ago•0 comments

Is Anthropic a Good Business?

https://www.polymathinvestor.com/p/is-anthropic-a-good-business
1•rwmj•6m ago•0 comments

FDA may allow some toxic chemicals to be added to food without safety review

https://www.theguardian.com/us-news/2026/oct/10/fda-toxic-chemicals-food-analysis
2•NewJazz•7m ago•0 comments

I tested whether AI agents obey text you never see. 4 of 8 did, every time

https://smallprint.dev/blog/one-sentence-four-of-eight-agents
1•nickcosta•7m ago•0 comments

Show HN: Lunatic Fling – a cel-shaded 3D remake of After Dark's Lunatic Fringe

https://lunaticfling.com/
1•hoag•11m ago•1 comments

Safe SIMD in Rust, even on the inside

https://shnatsel.github.io/safe-simd-in-rust-even-on-the-inside/
1•ravenical•11m ago•0 comments

Ask HN: A way for HN to verify "founders" and give them extra voting power?

1•amichail•12m ago•0 comments

The idea that temperature sets when we sleep

https://www.bbc.com/future/article/20261007-how-does-temperature-affect-your-sleep
2•Noaidi•13m ago•0 comments

Ask HN: Can we expect LLM-based coding agents to become noticeably faster?

1•lysace•15m ago•0 comments

Show HN: Peer-to-peer instant messaging with proof-of-work spam protection

https://github.com/iljah/p2pIM
2•iljah•16m ago•0 comments

My personal AI agent posted my bank details on company Slack

https://www.businessinsider.com/personal-ai-agent-grok-bot-posted-bank-details-company-slack-2026-10
6•bhrlady•21m ago•4 comments

AI Is Supercharging a Scam Economy Bigger Than the Cocaine Trade

https://www.bloomberg.com/graphics/2026-ai-supercharges-scam-economy/
2•toomuchtodo•24m ago•1 comments

Neanderthal wooden tools from Spain found preserved in stone

https://arstechnica.com/science/2026/10/neanderthal-wooden-tools-from-spain-found-preserved-in-st...
3•Brajeshwar•24m ago•0 comments

Are we dead moths in a puddle

https://jessicar.substack.com/p/are-we-dead-moths-in-a-puddle
1•airhangerf15•24m ago•0 comments

Logs as UX

https://www.jvt.me/posts/2026/10/09/logs-interface/
1•Brajeshwar•24m ago•0 comments

FlowCE: Calculus on your TI-84 Plus CE

https://tommyb3ll.github.io/FlowCE/
1•jgx0•24m ago•0 comments

Google expands SynthID Detector for AI content

https://blog.google/innovation-and-ai/models-and-research/google-deepmind/synth-id-ai-content/
2•gmays•25m ago•0 comments

The Human Soul as a Manifestation of Quantum-Like Fields

https://www.researchgate.net/publication/374749062_The_Human_Soul_as_a_Manifestation_of_Quantum-L...
2•olvy0•32m ago•0 comments

Post Capitalism

https://geohot.github.io//blog/jekyll/update/2026/09/29/post-capitalism.html
2•7777777phil•32m ago•0 comments

Radiolab: Math vs Machine

https://radiolab.org/podcast/math-vs-machine
3•kohsuke•34m ago•1 comments

Bitwarden Dual License Model

https://community.bitwarden.com/t/published-version-update-in-app-stores/102750
47•Cider9986•35m ago•10 comments

Agents and the Illusion of Productivity

https://opeonikute.dev/posts/agents-and-the-illusion-of-productivity
2•porridgeraisin•35m ago•1 comments

Show HN: Simple Security Checker

https://github.com/yuyalapis/security-checker
1•rozenapp•37m ago•0 comments

Is This Machine Playing?

https://machineplaying.org/
1•vinhnx•39m ago•1 comments

World Models for Biomedicine

https://www.cell.com/cell/fulltext/S0092-8674(26)01005-6
1•brandonb•40m ago•0 comments

Unikernels were hard. key word: were

https://ghuntley.com/unikernels/
2•ghuntley•40m ago•0 comments

FBI Arrests Executive at Ransomware Negotiation Firm

https://krebsonsecurity.com/2026/10/fbi-arrests-founder-of-ransomware-negotiation-firm/
6•rafaelc•41m ago•0 comments