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•8mo 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•8mo 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•8mo 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•7mo 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•8mo 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•8mo ago
Oh yes I agree with you. It may become a big push to convince my org to do that

Nvidia suppliers halt H200 output after China blocks chip

https://www.ft.com/content/02a3eb7c-684f-4e39-87b8-36e9595ef800
1•SanjayMehta•2m ago•1 comments

What are best products for creating video or interactive demos for a SaaS?

1•rishabhpoddar•4m ago•0 comments

Intuition why the derivative of $e^x$ is itself

https://math.stackexchange.com/questions/3511144/intuition-why-the-derivative-of-ex-is-itself
1•throwoutway•6m ago•0 comments

A Calif. teen trusted ChatGPT's drug advice. He died from an overdose

https://www.sfgate.com/tech/article/calif-teen-chatgpt-drug-advice-fatal-overdose-21266718.php
1•freediver•8m ago•0 comments

Gas Town is a glimpse into the future

https://johncodes.com/archive/2026/01-16-a-glimpse-into-the-future/
1•jpmcb•11m ago•0 comments

Building a Quake PC

https://fabiensanglard.net/quake_pc/index.html
2•zdw•12m ago•0 comments

China Clamps Down on High-Speed Traders, Removing Servers

https://www.bloomberg.com/news/articles/2026-01-16/china-clamps-down-on-high-speed-traders-removi...
4•petethomas•18m ago•0 comments

Astronaut Charlie Duke (2021) [video]

https://www.youtube.com/watch?v=U7jWk0u4K-E
1•ceroxylon•26m ago•1 comments

I skipped Japan's university exam to write a "computational metaphysics" exam

2•fumi2026•28m ago•0 comments

Grand Illusion

https://chrishedges.substack.com/p/grand-illusion-read-by-eunice-wong
1•chmaynard•31m ago•0 comments

Artisanal Code

https://sunnyamrat.com/posts/2026-01-17-artisanal-code/
2•sunnyam•31m ago•0 comments

Lucasfilm President Kathleen Kennedy to step down

https://www.latimes.com/entertainment-arts/business/story/2026-01-15/lucasfilm-president-kathleen...
3•iancmceachern•33m ago•1 comments

Stay-at-home sons are here – and they're not going anywhere

https://www.washingtonpost.com/style/trends/2026/01/16/stay-at-home-sons/
2•blondie9x•34m ago•2 comments

Show HN: Agent Coworking,Multi-agent networks for AI collaboration (open source)

https://openagents.org/showcase
2•snasan•36m ago•0 comments

Ask HN: Can companies claim copyright over their LLM-generated codebases?

2•mks_shuffle•39m ago•2 comments

GitHub Copilot now supports OpenCode

https://github.blog/changelog/2026-01-16-github-copilot-now-supports-opencode/
4•todsacerdoti•42m ago•0 comments

Show HN: I gave AI persistent memory. Someone didn't like that

1•Shaximus•43m ago•0 comments

Dispute with Russian billionaire leads to 4 Bay Area bankruptcies

https://www.sfgate.com/tech/article/russian-billionaire-four-biotech-bankruptcies-21299298.php
4•nradov•44m ago•0 comments

Crypto grifters are recruiting open-source AI developers

https://www.seangoedecke.com/gas-and-ralph/
2•lalitmaganti•51m ago•1 comments

GoodJob, Solid Queue, Sidekiq, Active Job, in 2026

https://island94.org/2026/01/goodjob-solid-queue-sidekiq-active-job-in-2026
1•thunderbong•53m ago•0 comments

Ben Affleck and Matt Damon on the Limits of AI in Filmmaking [video]

https://www.youtube.com/watch?v=O-2OsvVJC0s
4•karakoram•54m ago•0 comments

Every Inch Matters

https://mercurialsolo.substack.com/p/every-inch-matters
1•mercurialsolo•55m ago•1 comments

Chinese Fishing Boats Form Sea Barriers

https://www.nytimes.com/interactive/2026/01/16/world/asia/china-ships-fishing-militia-blockade.html
6•SubiculumCode•56m ago•3 comments

Video Analysis of ICE Shooting Sheds Light on Contested Moments

https://www.nytimes.com/2026/01/15/video/ice-shooting-renee-good-minneapolis-videos.html
5•treetalker•1h ago•1 comments

Alabama Snowfall Forecast

https://ema.alabama.gov/2026/01/15/thursday-afternoon-update-on-possible-snowfall-this-weekend/
1•qwertyuiop_•1h ago•0 comments

Show HN: Making Claude Code sessions link-shareable

3•reflectivetrap•1h ago•0 comments

Claude Code sessions are now link-shareable

https://github.com/OmkarKovvali/claude-session-share
1•reflectivetrap•1h ago•1 comments

Nearly 5M Accounts Removed Under Australia's New Social Media Ban

https://www.nytimes.com/2026/01/15/world/australia/social-media-ban-australia.html
4•bookofjoe•1h ago•1 comments

Anything Will Work (In AI)

https://publish.obsidian.md/ueaj/Machine+Learning/Theory/Anything+WILL+work
1•qouteall•1h ago•0 comments

Matthew McConaughey trademarks catchphrase in bid to beat AI fakes

https://www.theguardian.com/film/2026/jan/15/matthew-mcconaughey-trademarks-all-right-all-right-a...
5•puttycat•1h ago•1 comments