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

The secret operation to move the Bayeux Tapestry

https://www.nationalgeographic.com/history/article/bayeux-tapestry-return-england-british-museum
1•Tomte•1m ago•0 comments

Sen. Lindsey Graham dead at 71 after 'brief and sudden' illness, office says

https://www.dw.com/en/us-senator-lindsey-graham-dies/a-77921386
1•rock57•1m ago•0 comments

Parse inbound email to JSON in Node.js – MailKite

https://mailkite.dev/blog/parse-inbound-email-to-json-node/
2•aisendhub•2m ago•0 comments

To Build More Believable Bots, Simulate the Neurochemistry

https://github.com/smithandrewjohn/kindalive
1•beardyw•4m ago•2 comments

Ancient feeding-related neuropeptides regulate alloparenting in ants

https://www.nature.com/articles/s41586-026-10747-6
1•XzetaU8•11m ago•0 comments

How Aldi is taking on US supermarkets with its $4 almond butter

https://www.bbc.com/news/articles/cly0l5d5xn7o
2•reqo•13m ago•1 comments

Sen. Lindsey Graham dies at 71 from a 'sudden illness'

https://www.nbcnews.com/video/sen-lindsey-graham-dies-at-81-266555461760
2•josefrichter•14m ago•0 comments

Show HN: Bgchanger.video – change video backgrounds online

https://bgchanger.video/
1•andytuyu•15m ago•0 comments

Ask HN: Can anyone explain this Gsearch rabbit-hole?

1•Baljhin•16m ago•0 comments

Lindsey Graham, longtime South Carolina senator, dies at 71, office says

https://www.washingtonpost.com/politics/2026/07/12/lindsey-graham-longtime-south-carolina-senator...
10•Tomte•18m ago•2 comments

The Ten Commandments of AI Usage

https://defragzone.substack.com/p/the-ten-commandments-of-ai-usage
1•frag•18m ago•0 comments

AI song going to be viral in 2026

https://open.spotify.com/track/50mUiidUauqseqtm2Kr7U6
1•puildupO•26m ago•0 comments

LLMlet: P2P distributed LLM inference on browsers

https://github.com/ktock/llmlet
1•mrauha•27m ago•0 comments

Theoretical Limit of Image Compression [video]

https://www.youtube.com/watch?v=W39hBPOk9Hk
1•eln1•29m ago•0 comments

MSK – an AI agent that thinks like a CTO

https://apps.apple.com/us/app/msk-ai-cto-agent/id6778822216
1•moeidsaleem•30m ago•0 comments

Eternal Dogfooders: How is the child of Aha turns furry

https://rwhu.helluvaos.com/posts/what-to-eat-as-a-dog-inside-google
1•shscs911•32m ago•1 comments

Inside the secret AI war between Silicon Valley and China

https://www.washingtonpost.com/national-security/2026/07/06/why-anthropic-alleges-chinese-firms-a...
1•breve•37m ago•1 comments

Tell HN: Fable guardrails trigger on random questions

1•nocoder•51m ago•0 comments

Show HN: Rules-free solo-only client for the Paperback tabletop game

https://wanderinghorse.net/gaming/paperback/solo.html
1•sgbeal•53m ago•0 comments

AI found a Linux root bug that was missed for 15 years

https://www.wired.com/story/security-news-this-week-ai-found-a-root-bug-in-linux-that-everyone-mi...
1•crowd51•1h ago•0 comments

The ancient Chinese way to cool homes (2023)

https://www.bbc.com/future/article/20230712-how-ancient-skywells-are-keeping-chinese-homes-cool
2•1659447091•1h ago•0 comments

DeepSeek developing its own AI chip, sources say

https://www.reuters.com/world/china/chinas-deepseek-developing-its-own-ai-chip-sources-say-2026-0...
3•theanonymousone•1h ago•0 comments

Show HN: Mindwalk – Replay coding-agent sessions on a 3D map of your codebase

https://github.com/cosmtrek/mindwalk
2•cosmtrek•1h ago•0 comments

An open letter to the Medici of intelligence

https://www.sov.vc/blog/the-next-frontier-sovereignty
1•abreckle•1h ago•0 comments

What Happens Inside DynamoDB When You Hit 3000 RCU on a Single Partition Key

https://medium.com/@yalovoy/what-happens-inside-dynamodb-when-you-hit-3000-rcu-on-a-single-partit...
1•zero-ground-445•1h ago•0 comments

Vinod Khosla to Buy Seattle Seahawks for $9.6B

https://www.sportico.com/business/team-sales/2026/seattle-seahawks-sale-vinod-khosla-owner-billio...
14•kpw94•1h ago•2 comments

Ask HN: How do you manage content for React-based websites?

1•admininistratos•1h ago•1 comments

Who cleans up after the vibe-coding party?

https://www.ft.com/content/cec8df9e-b43b-4cd1-8feb-c07e804e8d33
2•jweir•1h ago•1 comments

Boeing 737 window dislodged, passenger partially sucked out

https://www.reuters.com/business/ryanair-plane-makes-emergency-landing-greece-after-window-dislod...
2•smallnix•1h ago•0 comments

BSD Make Extravaganza

https://github.com/b-aaz/bmake-extravaganza
1•signa11•1h ago•0 comments