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

When Rust Gets Ugly

https://corrode.dev/blog/ugly/
2•ethanplant•2m ago•0 comments

What Makes Humans Stupid

https://nautil.us/what-makes-humans-stupid-1282459
2•rbanffy•3m ago•0 comments

LANA Project Interim Report 2026: Computer-Assisted Verification of IUT Theory [video]

https://www.youtube.com/watch?v=KADN5NHmIfw
1•amichail•5m ago•0 comments

Open Book Touch: open-source e-reader

https://www.crowdsupply.com/oddly-specific-objects/open-book-touch
3•surprisetalk•7m ago•0 comments

128Gb Eight Channel Workstation Madness: Threadripper 3995WX in Windows 8.1

https://trackerninja.codeberg.page/post/128gb-eight-channel-workstation-madness-paired-with-threa...
1•spacedrone808•8m ago•0 comments

Building an Advanced Agentic Harness

https://data4sci.substack.com/p/building-an-advanced-agentic-harness
1•Anon84•10m ago•0 comments

Trump blames Canada for wildfire smoke, says he'll add cost to tariffs

https://www.reuters.com/world/ontario-buy-new-11-new-aircraft-very-difficult-wildfire-fight-2026-...
4•sleepyguy•10m ago•0 comments

Surprise and Delight [video]

https://www.youtube.com/watch?v=4J1dQIjneJY
2•Anon84•11m ago•0 comments

Webpack Is Now on Bluesky

https://bsky.app/profile/webpack.js.org
2•avivkeller•11m ago•0 comments

Topcoat: The full full-stack framework for Rust

https://github.com/tokio-rs/topcoat
3•wertyk•13m ago•0 comments

Caution: Children Might Impoverish Their Parents

https://retirementincomejournal.com/article/warning-children-might-impoverish-their-parents/
1•petethomas•14m ago•0 comments

Right to Repair Fundraiser Goal Reached

https://sfconservancy.org/news/2026/jul/16/software-right-to-repair-baltobu-fundraiser-succes/
1•nfriedly•15m ago•0 comments

Faulty Towers, vibe sickness, and the vibe bobsled

https://dustycloud.org/blog/faulty-towers-vibe-sickness-and-the-vibe-bobsled/
1•sanqui•19m ago•1 comments

Google Weather Lab 2

https://deepmind.google.com/science/weatherlab
2•xnx•23m ago•0 comments

Show HN: Tests.ws – WebSocket testing tools, language guides, Chrome extension

https://tests.ws/
1•gingermanymph•23m ago•0 comments

Aurora DSQL: Scalable, Multi-Region OLTP

https://arxiv.org/abs/2607.13276
2•shenli3514•24m ago•0 comments

Sliding into Silence? We Are Speaking 300 Daily Words Fewer Every Year

https://journals.sagepub.com/doi/10.1177/17456916261425131
1•Pamar•25m ago•1 comments

China's Latest A.I. Breakthrough Threatens America's Lead

https://www.nytimes.com/2026/07/17/business/china-ai-moonshot-kimi.html
2•petilon•26m ago•0 comments

Grumpy Website

https://grumpy.website/
3•Gecko4072•27m ago•0 comments

The first patch is a price check, not the product

https://github.blog/engineering/the-cost-of-saying-yes-has-changed/
1•logickkk1•27m ago•0 comments

Static search trees: 40x faster than binary search (2024)

https://curiouscoding.nl/posts/static-search-tree/
1•lalitmaganti•30m ago•0 comments

China's Xi Jinping launches new AI alliance, WAICO

https://www.aljazeera.com/news/2026/7/17/chinas-xi-jinping-launches-new-ai-alliance-what-is-it
3•culi•30m ago•2 comments

Recreating the best engineering zine from the 90s

https://circazine.hackclub.com/
2•lsanchezz•31m ago•0 comments

France blocks access to Polymarket website

https://www.reuters.com/technology/french-internet-service-providers-told-block-access-polymarket...
2•1659447091•32m ago•1 comments

Ask HN: Did you try Nordstjernen Web Browser 1.0.19 yet?

2•roschdal•32m ago•2 comments

MLB restricts using dugout iPads for AI-assisted in-game strategy

https://www.espn.com/mlb/story/_/id/49385415/mlb-restricts-dugout-ipad-use-prevent-artificial-int...
2•HardwareLust•35m ago•0 comments

Linus Torvalds to critics of AI coding in Linux: "Fork it. Or just walk away."

https://arstechnica.com/ai/2026/07/linus-torvalds-to-critics-of-ai-coding-in-linux-fork-it-or-jus...
6•baal80spam•35m ago•1 comments

Google Earth Pro for desktop will no longer be available to download soon

https://www.techradar.com/computing/the-impact-to-thousands-of-companies-across-industries-will-b...
2•asoberbeck•36m ago•0 comments

Chemical Onshoring of All Kinds

https://www.science.org/content/blog-post/chemical-onshoring-all-kinds
1•EA-3167•37m ago•0 comments

CollpaseOS: Program microcontrollers through civilizational collapse

https://collapseos.org/
1•Gecko4072•37m ago•0 comments