frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

OpenRouter raises $113M Series B

https://openrouter.ai/announcements/series-b
1•freeCandy•14s ago•0 comments

Microcode inside the Intel 8087 floating-point chip: register exchange

https://www.righto.com/2026/05/microcode-inside-intel-8087-floating.html
1•pwg•29s ago•0 comments

The Char[] Cult

https://feds-will-find.you/blog/the-char-cult
1•onesingleblast•2m ago•0 comments

How many days of the week have a fish in them?

https://bsky.app/profile/badambulist.bsky.social/post/3mmzwpumuic2x
1•dennis-tra•7m ago•0 comments

Original NASA Apollo 11 guidance computer source code for the Lunar Module

https://github.com/chrislgarry/Apollo-11
1•gmmachine•9m ago•0 comments

Trump to cancel America's 250th birthday concert as artists drop out

https://www.dailymail.com/news/article-15860985/donald-trump-america-birthday-concert-cancel-head...
2•Bender•13m ago•0 comments

Show HN: BuildBy – find out how many Electron apps are on your Mac or Windows

https://github.com/wavever/buildby
1•wavever•14m ago•0 comments

The future will be millions agents running task everyday?

https://github.com/wilmanrojas/sinqua
1•wilmanro77•15m ago•0 comments

The Biggest Tell That Something Was Written by AI

https://www.theatlantic.com/technology/2026/05/how-to-tell-ai-writing/687345/
2•helloplanets•15m ago•0 comments

Flathub disallows LLM-based submissions

https://social.treehouse.systems/@barthalion/116657011366876079
2•birdculture•17m ago•0 comments

AI Didn't Create These Problems. It Just Stopped Routing Around Them

https://baweaver.com/writing/2026/05/27/ai-didnt-create-these-problems/
2•mooreds•21m ago•0 comments

Kickle Cubicle

https://en.wikipedia.org/wiki/Kickle_Cubicle
1•tosh•23m ago•0 comments

A new extraction process could unlock the lithium

https://www.technologyreview.com/2026/05/28/1138096/lithium-extraction-rock-zero/
1•joozio•24m ago•0 comments

Kemmerer Plans for Man Camp to House 1,600 TerraPower Nuclear Plant Workers

https://cowboystatedaily.com/2026/05/29/kemmerer-plans-for-man-camp-to-house-1-600-terrapower-nuc...
1•Bender•25m ago•0 comments

A Practical Guide for Secure MCP Server Development

https://genai.owasp.org/resource/a-practical-guide-for-secure-mcp-server-development/
2•mooreds•25m ago•0 comments

Too much time with colleagues can sour social interaction

https://www.economist.com/science-and-technology/2026/05/27/too-much-time-with-colleagues-can-sou...
1•kjw•27m ago•0 comments

Dear Steve Lemay

https://ilyabirman.net/meanwhile/all/dear-steve-lemay/
2•zahrevsky•27m ago•1 comments

Show HN: UN Condemnation Statistics

https://boxed.github.io/UN-condemns/
1•boxed•29m ago•0 comments

Token Is the New Currency

https://github.com/leogong99/codepulse
1•leogong99•29m ago•0 comments

Show HN: Community Ninja – Find customers searching for your product

https://communityninja.ai/
1•shashanoid•29m ago•0 comments

Fever Dreams

https://lwlies.com/article/werner-herzog-jungle-workshop
1•jruohonen•31m ago•0 comments

China building ASAT launchers to defend against Elon Musk's Golden Dome

https://www.reuters.com/graphics/CHINA-MILITARY/NUCLEAR/zjpqmbrlqpx/
2•infinitewars•32m ago•2 comments

Nikon weaponizes lower prices to break ASML's lithography monopoly

https://www.tomshardware.com/tech-industry/nikon-plans-to-undercut-asml-on-price-to-win-back-chip...
4•rbanffy•32m ago•0 comments

Practical Uses of Monads in Haskell

https://nauths.fr/en/2026/05/28/practical-use-of-monads.html
1•thunderbong•33m ago•0 comments

Ask HN: Why can we compare Python to Go, but we can't compare apples to oranges?

2•chirau•34m ago•1 comments

Chips Act 2.0 and beyond: Indispensability, not self-sufficiency

https://www.bruegel.org/opinion-piece/chips-act-20-and-beyond-indispensability-not-self-sufficiency
1•jruohonen•36m ago•0 comments

The tension between local and cloud agents

https://vivekhaldar.com/articles/local-vs-cloud-agents/
1•gandalfgeek•36m ago•0 comments

My thoughts on the future of Go in the AI era

https://www.youtube.com/watch?v=TjlRD_VE12Y
1•der_gopher•37m ago•0 comments

Edgar Morin

https://en.wikipedia.org/wiki/Edgar_Morin
1•simonebrunozzi•40m ago•0 comments

Fluid Simulation for Dummies

https://www.mikeash.com/pyblog/fluid-simulation-for-dummies.html
2•sebg•41m ago•0 comments