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

Make Waiting for AI Fun

https://commonsmade.com/hackathons
1•ceen•1m ago•0 comments

The first mail client with built-in compression and encryption

https://medium.com/@chris.ahrweiler/the-first-mail-client-with-built-in-compression-and-encryptio...
1•docjojo•3m ago•0 comments

Teamwork: When AI Becomes a Research Partner – Google Antigravity Blog

https://antigravity.google/blog/teamwork-when-ai-becomes-a-research-partner
1•porridgeraisin•6m ago•0 comments

Sovereignty is now a feature, and Canadian founders are shipping it for free

https://betakit.com/sovereignty-is-now-a-feature-and-canadian-founders-are-shipping-it-for-free/
2•ClearwayLaw•7m ago•0 comments

Particle system updates X3D exporter, documentation, geometry shader fixes

https://castle-engine.io/wp/2026/08/26/particle-system-updates-custom-shaders-web-support-freecad...
1•mariuz•7m ago•0 comments

How to Critically Read LLM Texts [video]

https://www.youtube.com/watch?v=BBmNOxQWcAc
1•jmount•7m ago•0 comments

Why Responsible AI Adoption Still Starts with People

https://www.tylertech.com/resources/blog-articles/why-responsible-ai-adoption-still-starts-with-p...
1•cebert•9m ago•0 comments

Show HN: Claude Code Skills – Solving context bloat

https://github.com/yevhens-hue/claude-skills-starter-kit
2•eshaforostov•10m ago•0 comments

Trump suggests cattle ranchers could bypass USDA-inspected meat plants

https://www.washingtonpost.com/politics/2026/08/28/trump-suggests-allowing-ranchers-bypass-usda-i...
2•bithammerthunde•11m ago•0 comments

Form Follows Function

https://en.wikipedia.org/wiki/Form_follows_function
1•nomilk•12m ago•0 comments

Agentic Workflow Design: Six Principles for 2026

https://www.amyzyuan.com/thoughts/agentic-workflow-design-2026
2•eterconf•13m ago•0 comments

Oligodendrocyte dysfunction in human age-related cognitive decline

https://www.nature.com/articles/s41591-026-04608-y
2•bookofjoe•14m ago•0 comments

Adapting to AI: Leadership

https://blog.colinbreck.com/adapting-to-ai-leadership/
1•kiyanwang•15m ago•0 comments

China rejected a container of Argentine beef. Here's what the US did next

https://tallow.app/blog/china-rejected-argentina-beef-chloramphenicol
3•mkl95•17m ago•0 comments

A few feral cats in an ALGOL trenchcoat.

https://wiki.xxiivv.com/site/pop2.html
3•bmacho•18m ago•1 comments

Tsundoku: The art of buying books and never reading them

https://www.bbc.com/news/world-44981013
3•austinallegro•19m ago•2 comments

Prompt Engineering Best Practices in 2026: Why the Advice Contradicts Itself

https://www.amyzyuan.com/thoughts/prompt-engineering-best-practices-2026
3•eterconf•19m ago•0 comments

States can regulate prediction markets as gambling, federal appeals court rules

https://www.cnn.com/2026/08/28/business/states-prediction-markets-gambling-federal-appeals-court
3•cocacola1•19m ago•0 comments

Social Policy Builds Financial Markets

https://economicsociology.org/2026/08/28/how-social-policy-builds-financial-markets/
1•kome•20m ago•0 comments

Superlogical 3min Demo

https://twitter.com/mitchellh/status/2093451043661316217
1•mfiguiere•21m ago•0 comments

We Tested a Smartphone Smuggled from North Korea - WSJ [video]

https://www.youtube.com/watch?v=nBRZKG1kjBM
1•mudil•22m ago•0 comments

Artificial Intelligence and the Problem of Induction [pdf]

https://www.iiardjournals.org/get/JHSP/VOL.%12%NO.%1%2026/Artificial%Intelligence%and%the%Problem...
1•1vuio0pswjnm7•24m ago•0 comments

The Answer to Every Problem

https://www.raptitude.com/2026/06/the-answer-to-every-problem/
2•Curiositry•24m ago•0 comments

Audience Infrastructure

1•DIMAZA•26m ago•0 comments

I have made an OS in CUDA

https://twitter.com/ShimazuSystems/status/2093064608122655000
2•porridgeraisin•28m ago•0 comments

I'd like to take a moment to speak to you about the Adobe PSD format (2012)

https://github.com/zepouet/Xee-xCode-4.5/blob/master/XeePhotoshopLoader.m
4•consumer451•30m ago•1 comments

Invisible Source Skew

https://www.lawfaremedia.org/article/invisible-source-skew
1•EA-3167•31m ago•0 comments

Who is at the frontier of terminal tasks?

https://fidian.ai/blog/tb-fn-benchmark-results/
1•amrrs•33m ago•0 comments

492 FIPS 140-2 certificates still active, 23 days before the sunset

https://808bits.com/fips/140-2-sunset/
2•meehow•34m ago•0 comments

AMD Strix Halo Wiki

https://strixhalo.wiki/
1•devy•34m ago•0 comments