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

Two channels for the top–antitop excess

https://cerncourier.com/two-channels-for-the-top-antitop-excess/
1•visha1v•26s ago•0 comments

Illuminating Iron Clusters' Magnetism

https://physics.aps.org/articles/v19/s92
1•visha1v•1m ago•1 comments

Explanation of everything you can see in htop/top on Linux

https://peteris.rocks/blog/htop/
1•theanonymousone•3m ago•0 comments

TabFM: Zero-shot tabular foundation model from Google Research

https://huggingface.co/google/tabfm-1.0.0-pytorch
1•theanonymousone•3m ago•0 comments

The Common Lisp Cookbook – LispWorks Review

https://lispcookbook.github.io/cl-cookbook/lispworks.html
1•AlexeyBrin•6m ago•0 comments

The Most Iconic American Artwork Is the Hardest to See

https://www.nytimes.com/interactive/2026/07/02/arts/design/statue-of-liberty-history-france-us.html
1•jsenn•6m ago•0 comments

Show HN: Sandbox-proxy – A forward proxy that injects credentials to sandboxes

https://github.com/yagop/sandbox
1•yagop•7m ago•0 comments

Why AI Will Never Achieve Consciousness

https://roburie.substack.com/p/why-ai-doesnt-think-cannot-reason
1•megamike•7m ago•0 comments

Chip Industry Urges US to Avoid Moves That Distort Memory Market

https://www.bloomberg.com/news/articles/2026-07-02/chip-industry-urges-us-to-avoid-moves-that-dis...
1•giuliomagnifico•8m ago•0 comments

Tokdash – track tokens, quotas, resets and AI usage locally

https://github.com/JingbiaoMei/Tokdash
1•howardme1•10m ago•0 comments

Organization as a Graph [video]

https://www.wearedevelopers.com/en/videos/2051/your-organization-as-a-graph
1•dunyakirkali•12m ago•0 comments

Critical Evidence from Early Evolution of House Dust Mites [pdf]

https://academic.oup.com/sysbio/article-abstract/62/3/411/1652447?redirectedFrom=fulltext
1•thunderbong•13m ago•0 comments

It's not me, it's the compiler

https://parsa.wtf/cast/
3•jonathandeamer•13m ago•0 comments

Olive – Lisp VSCode Extension (Alternative to Alive)

https://github.com/kchanqvq/olive
1•AlexeyBrin•17m ago•0 comments

Meta's Inevitable Cloud

https://spyglass.org/meta-cloud/
1•RickJWagner•18m ago•0 comments

Notes for June 28 – July 4

https://taoofmac.com/space/notes/2026/07/04/1230
1•rcarmo•23m ago•0 comments

It's Hard to Eval Is a Product Smell

https://hamel.dev/blog/posts/eval-smell/
2•_pdp_•23m ago•0 comments

"How do you plan to dismantle the servers of your rival AIs?" [video]

https://www.youtube.com/watch?v=aicfLYrRuUw
1•deadprogram•24m ago•0 comments

Show HN: A free, no-ad, no-account, no-server iOS calorie budgeting/diet app

https://apps.apple.com/gb/app/budgie-diet/id6670401868
3•PurestGuava•24m ago•0 comments

The Reports of Jim Carrey's Death Are a Failure Mode

https://tane.dev/2026/07/the-reports-of-jim-carreys-death-are-a-failure-mode/
1•taubek•24m ago•0 comments

Did the founders of the United States intend to create a Christian nation?

https://theconversation.com/the-us-founders-other-revolutionary-choice-separating-religion-and-go...
1•chmaynard•26m ago•0 comments

Startup Targets Datacenters with 3D-Printed Nuclear Reactor Module

https://www.theregister.com/systems/2026/07/03/startup-targets-datacenters-with-3d-printed-nuclea...
1•_pdp_•28m ago•0 comments

Polymarket-SDK-cpp – C++23 SDK for Polymarket prediction markets

https://github.com/Wammero/polymarket-sdk-cpp
1•Wammerq•31m ago•0 comments

Nexus System Manager

https://github.com/rilindbytyqi300/NexusSystemManager
1•rilindbytyqi1•32m ago•0 comments

Developer Verification – LineageOS

https://lineageos.org/Developer-Verification/
1•kevincox•34m ago•0 comments

Hot weather and low sunshine linked to mental health-related healthcare use

https://www.uea.ac.uk/about/news/article/everyday-weather-can-increase-demand-for-mental-health-s...
1•giuliomagnifico•42m ago•0 comments

Is a 'Frictionless' Society a Trap?

https://www.nytimes.com/2026/07/02/magazine/frictionless-productivity-marketing-tech.html
1•1vuio0pswjnm7•42m ago•0 comments

Free SaaS Landing Page Template – React, Vue, HTML for Claude Code and Cursor

https://github.com/hannah-wright/saas-landing-page-template
1•DreyGreatness•43m ago•0 comments

Microsoft Disclosure Provides Rare Glimpse of Tax Haven Tactics

https://www.nytimes.com/2026/07/03/technology/microsoft-europe-disclosure-tax-havens.html
2•1vuio0pswjnm7•45m ago•0 comments

Show HN: ProxyBoy. A Windows HTTP/HTTPS debugging proxy with an AI assistant

https://github.com/pjperez/proxyboy
1•InfraScaler•46m ago•0 comments