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

TypeScript 7 RC: the compiler rewritten in Go, around 10x faster

https://jatniel.dev/en/bytes/typescript-7-rc-the-compiler-rewritten-in-go-around-10x-faster
1•jtnl•3m ago•0 comments

A tiny (18KB for rpi zero)easy to read file listing tool. rust no_std and Libc

https://github.com/tracyspacy/fli
2•yulkor•6m ago•0 comments

Show HN: Didon – AI workday reports for productivity analysis

https://www.didon.app/
1•babakzy•9m ago•0 comments

Dialog Society: Ezra Klein Comments

https://twitter.com/ezraklein/status/2068479476309151771
1•u1hcw9nx•11m ago•1 comments

Highly sensitive radio telescope array to be built in Nevada desert

https://www.nbcnews.com/science/space/radio-telescope-array-nevada-desert-rcna350710
1•jonbaer•13m ago•0 comments

Agile Is a Scourge on the Planet

https://unacceptable.nl/posts/on-agile/
1•zwckl•13m ago•0 comments

We Do Not Build for Humans

https://www.agentmail.to/blog/we-do-not-build-for-humans
2•kiyanwang•15m ago•0 comments

KitaabAI AI book and thesis writer with native Urdu support

https://kitaabai.com
1•darweshpk•16m ago•0 comments

Show HN: ReplyVoice <> global floating button for Android voice dictation

https://replyvoice.com
1•kedimuzafer•20m ago•0 comments

Brands using AI-generated influencers to promote products on social media

https://www.theguardian.com/technology/2026/jun/21/brands-using-ai-generated-influencers-to-promo...
2•pseudolus•25m ago•0 comments

Use Faker to improve the quality of your tests

https://howtotestfrontend.com/resources/why-you-should-use-faker
1•howToTestFE•30m ago•0 comments

The Grammar of Coding Agents

https://grammar-of-coding-agents.pages.dev
2•allenb•39m ago•1 comments

The Web Is for People

https://www.torgo.com/blog/2026/06/the-web-is-for-people.html
2•robin_reala•42m ago•0 comments

Dr. Erna Shneider Hoover Revolutionized Telecommunications [pdf]

https://ulopenaccess.com/papers/ULAHU_V03I02/ULAHU20260302_004.pdf
1•Tomte•43m ago•0 comments

China unveils a portable anti-drone laser that can down drones from 1,600ft away

https://www.tomshardware.com/tech-industry/china-shows-off-a-backpack-sized-anti-drone-laser-that...
2•giuliomagnifico•46m ago•0 comments

Kalman Filter

https://en.wikipedia.org/wiki/Kalman_filter
2•1e1a•46m ago•0 comments

MCP server that lets Claude click menus on your Mac and fix its own mistakes

https://github.com/m0rvayne/mcp-osascript
1•m0rvayne•48m ago•0 comments

Softmax-free ~354M: tile-skip kernels for long-context VRAM savings (sparse)

https://huggingface.co/Tripstoph/RRT-Foundation
1•Tripstoph•49m ago•0 comments

The unreasonable effectiveness of LLMs for auditing Rust code

https://shnatsel.medium.com/the-unreasonable-effectiveness-of-llms-for-auditing-rust-code-d4df8bf...
1•heinrich5991•49m ago•0 comments

Bell.com

https://bell.com
1•tentacleuno•58m ago•0 comments

CTOs Agree: Cognitive Debt Is the New Technical Debt

https://shiftmag.dev/ctos-agree-cognitive-debt-is-the-new-technical-debt-10229/
12•sxx0•1h ago•2 comments

Sword Swallowing and Its Side Effects

https://pmc.ncbi.nlm.nih.gov/articles/PMC1761150/
2•nephihaha•1h ago•0 comments

What does it mean for AI to be democratic?

https://blog.andymasley.com/p/what-does-it-mean-for-ai-to-be-democratic
1•jger15•1h ago•0 comments

Hidden Tunnels Dating Back to Henry VIII's Reign Discovered at Boarding School

https://www.smithsonianmag.com/smart-news/hidden-tunnels-dating-back-to-henry-viiis-reign-were-di...
1•bookofjoe•1h ago•0 comments

POSBox – Free Open Source Point of Sale System

https://github.com/train2128/POSBox---Point-of-Sale-System
1•train212•1h ago•0 comments

NSA director: 'Mythos "broke into almost all of our classified systems in hours"

https://www.economist.com/briefing/2026/06/14/donald-trumps-blocking-of-anthropic-is-capricious-a...
15•ricksunny•1h ago•13 comments

Building a Swarm of Telescopes to Find Life

https://www.universetoday.com/articles/astronomers-want-to-build-a-swarm-of-telescopes-to-find-life
1•tcp_handshaker•1h ago•0 comments

What the Wounds Are Telling Us (2025)

https://www.volkskrant.nl/kijkverder/v/2025/gunshot-palestine-children-israel-war~v1819649/
1•tcp_handshaker•1h ago•0 comments

Geo-engineering to protect against solar storms

https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2025SW004846
2•dylancollins•1h ago•1 comments

Survival Ball

https://survivalball.com/
1•lopespm•1h ago•0 comments