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

Ask HN: What do you think about US Government's Geographic Ban on Fable?

1•akashwadhwani35•1m ago•0 comments

How a Linguist Helped Me Understand C

https://jjrgn.substack.com/p/how-a-linguist-helped-me-understand
1•3rly•10m ago•0 comments

Animation Vocabulary

https://animations.dev/vocabulary
2•vinhnx•12m ago•0 comments

El Niño and the Iran war may spark hunger crisis for more than 100M

https://www.washingtonpost.com/climate-environment/2026/06/12/why-iran-war-powerful-el-nio-could-...
2•MilnerRoute•16m ago•0 comments

Dave Eggers doesn't need a smartphone, the internet or your Flock camera

https://www.sfgate.com/sf-culture/article/dave-eggers-profile-22291491.php
3•mikhael•17m ago•0 comments

Fable 5 is gone from model lists

https://www.anthropic.com
2•Robelk1•19m ago•1 comments

Show HN: LLMRender, a 10kb Markdown+LaTeX renderer for React

https://llmrender.com/
2•franciscop•24m ago•0 comments

Sam Bankman-Fried loses fraud conviction appeal

https://www.ft.com/content/adbf76dc-c476-4f8f-9a6e-3bea0a5c24a6
2•petethomas•29m ago•0 comments

How flat is replacing fat in AWS data center networks

https://www.amazon.science/blog/how-flat-is-replacing-fat-in-aws-data-center-networks
1•porjo•31m ago•0 comments

Our response to the US ban on Fable 5 and Mythos 5

https://isaacus.com/blog/our-response-to-the-us-ban-on-fable-5-and-mythos-5
1•ubutler•35m ago•0 comments

ProofLayer Rules – runtime security, red-team evals for LangGraph

https://github.com/sinewaveai/prooflayer-rules
1•dchitimalla1•40m ago•0 comments

HAFT: Higher-Order Abstractions for Rust

https://www.deepcausality.com/blog/announcement-haft-hkt/
1•marvin-hansen•45m ago•0 comments

Qatar pursued secret talks with Iran to shield gas complex from strikes

https://www.washingtonpost.com/world/2026/06/12/qatar-pursued-secret-talks-with-iran-shield-gas-c...
2•pinewurst•48m ago•0 comments

Show HN: The A-C Coupling Theorem – Solving Diophantine Systems in O(1)

https://zenodo.org/records/20648657
4•A19dammer91•51m ago•0 comments

Notion Is Migrating to SwiftUI, Apple Confirms at WWDC

https://www.macrumors.com/2026/06/12/notion-is-migrating-to-swiftui/
1•peterspath•52m ago•0 comments

Fable 5 Released and Suddenly I'm Much More Paranoid About My VSCode Extensions

https://medium.com/@ishaan_agrawal/fable-5-dropped-and-im-suddenly-a-lot-more-paranoid-about-my-v...
3•shadow-ninja•52m ago•0 comments

The MilkV Jupiter 2/SpacemiT K3

https://taoofmac.com/space/reviews/2026/06/11/1830
1•zdw•53m ago•0 comments

Palantir loses lawsuit disputing story of how Swiss govt rejected its services

https://www.theguardian.com/technology/2026/jun/13/palantir-loses-legal-challenge-to-force-swiss-...
4•Geekette•1h ago•0 comments

Show HN: DNSweep – DNS lookup with ASN, anycast, and CDN/WAF detection

https://dnsweep.com
1•layer7_ethan•1h ago•0 comments

A Lean 4-verified Balansis lib to eliminate NaN and make zero-division safe

https://github.com/XTeam-Pro/Balansis
2•AndrewHakmi•1h ago•0 comments

Charlie Dalin, Who Set a Sailing Record While Battling Cancer, Dies at 42

https://www.nytimes.com/2026/06/12/sports/sailing/charlie-dalin-dead.html
2•iancmceachern•1h ago•0 comments

Gene Shalit, longtime 'Today' show movie critic, dies at 100

https://apnews.com/article/gene-shalit-dies-b8ed6f4b7054e530e5fba9a808902cca
2•petethomas•1h ago•0 comments

Elon Musk becomes first trillionaire

https://www.bbc.com/news/articles/c4gypy3wwl7o
4•tonyhart7•1h ago•1 comments

Text/Plain Blog

https://textplain.blog/
5•flykespice•1h ago•2 comments

OpenHands Index

https://index.openhands.dev/home
1•jmj•1h ago•0 comments

Let's call 'em "aigents"

https://www.autodidacts.io/aigents/
2•Curiositry•1h ago•0 comments

Dhtmlx Gantt – JavaScript Gantt Chart (Community Edition)

https://github.com/DHTMLX/gantt
1•thunderbong•1h ago•0 comments

CipherNode – An offline, self-correcting AI swarm compiled to a single .exe

1•CipherNode•1h ago•0 comments

China cracks down on Western AI models while US companies flock to DeepSeek

https://www.techradar.com/pro/the-great-ai-irony-china-cracks-down-on-western-models-while-us-com...
4•giuliomagnifico•1h ago•0 comments

Forbes declares Elon Musk as the world’s first trillionaire

https://www.forbes.com/sites/pr/2026/06/12/forbes-declares-elon-musk-as-the-worlds-first-trillion...
2•teleforce•1h ago•5 comments