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

Grub 2.14 Released

https://lists.gnu.org/archive/html/grub-devel/2026-01/msg00029.html
1•cbmuser•33s ago•0 comments

Translation of Ingarden's "Controversy over the Existence of the World: Vol. I"

https://library.oapen.org/bitstream/handle/20.500.12657/90159/9783653037678.pdf?sequence=1&isAllo...
1•danielam•1m ago•0 comments

SpaceX Introduces New Residential Starlink Service Plans in the U.S.

https://twitter.com/SawyerMerritt/status/2011567264643105273
1•dayyan•3m ago•1 comments

Joe Rogan Blasts Trump's "Gestapo" ICE

https://www.axios.com/2026/01/14/ice-trump-joe-rogan-immigration-minneapolis-shooting
2•leopoldj•4m ago•3 comments

Siblings Who Say Michael Jackson Molested Them Appear in Court

https://www.rollingstone.com/music/music-news/michael-jackson-siblings-molested-1235499441/
1•handfuloflight•4m ago•0 comments

US, for first time in 50 years, experienced negative net migration in 2025

https://abcnews.go.com/US/us-1st-time-50-years-experienced-negative-net/story?id=129175522
2•pqtyw•4m ago•0 comments

Rewiring My HVAC to Maximize My EcoBee's Control Capabilities

https://benhouston3d.com/blog/upgrading-hvac-control
2•bhouston•6m ago•0 comments

Gas Town Decoded

https://www.alilleybrinker.com/mini/gas-town-decoded/
1•alilleybrinker•7m ago•0 comments

ICE Is Waging War on Blue Cities

https://www.nytimes.com/2026/01/14/opinion/ice-trump-minnesota.html
2•mickle00•7m ago•0 comments

We built a browser with GPT-5.2 in Cursor

https://twitter.com/mntruell/status/2011562190286045552
1•jacobedawson•8m ago•0 comments

Hopper – A Gopher/Gemini Protocol Browser for Playdate

https://tkers.itch.io/hopper
1•rickcarlino•11m ago•0 comments

It's illegal to build a gaydar in the EU

https://artificialintelligenceact.eu/high-level-summary/
1•jordigh•13m ago•0 comments

With tensions high, Israel and Iran reassured each other via Russia

https://www.washingtonpost.com/world/2026/01/14/israel-iran-russia-secret-messages/
2•ent101•13m ago•0 comments

AI code creates 1.7x more problems

https://www.coderabbit.ai/blog/state-of-ai-vs-human-code-generation-report?ck_subscriber_id=26164...
1•krinn_silver•15m ago•1 comments

The motivic class of the space of genus $$0 maps to the flag variety

https://arxiv.org/abs/2601.07222
1•gmays•16m ago•0 comments

Show HN: Forecats – Weather-themed images of your cats in Home Assistant

https://github.com/jwardbond/forecats
2•jwardbond•16m ago•0 comments

Ask HN: Weird Archive.today Behavior?

2•rabinovich•16m ago•0 comments

ChromaDB Explorer

https://www.chroma-explorer.com/
1•arsentjev•16m ago•0 comments

US Debt Monitor Live

https://www.us-debt-clock.com/
2•vednig•17m ago•1 comments

Show HN: Smart Tab Suspender – Reduce Chrome memory usage by autosuspending tabs

https://chromewebstore.google.com/detail/smart-tab-suspender/mmhfonkfehekiofpkjiofjeoofloidog
1•yavuzyildirim•20m ago•0 comments

Infinite Collaborative Word Search Game

https://words.zip/
4•bookofjoe•20m ago•0 comments

Crafting Interpreters

https://craftinginterpreters.com/
3•tosh•20m ago•0 comments

OpenAI Forges Multibillion-Dollar Computing Partnership with Cerebras

https://www.wsj.com/tech/ai/openai-forges-multibillion-dollar-computing-partnership-with-cerebras...
3•rbanffy•21m ago•1 comments

Ugandans, Iranians turn to Dorsey's messaging app Bitchat in web crackdowns

https://www.reuters.com/business/media-telecom/ugandans-iranians-turn-dorseys-messaging-app-bitch...
1•_djo_•23m ago•0 comments

Analyzing my own genome with DRAGEN and Claude

https://www.dddiaz.com/post/t1d-genome-analysis-report/
1•dddiaz1•26m ago•0 comments

Training My Smartwatch to Track Intelligence

https://dmvaldman.github.io/rooklift/
1•dmvaldman•27m ago•0 comments

Scaling long-running autonomous coding

https://cursor.com/blog/scaling-agents
19•samwillis•28m ago•8 comments

The novelists who predicted our present

https://www.theguardian.com/books/2026/jan/10/mass-surveillance-the-metaverse-making-america-grea...
4•mooreds•29m ago•3 comments

The Hypocrisy over Iran

https://www.telegraph.co.uk/news/2026/01/14/silence-luvvies-iran-exposes-left-war-on-west-middle-...
4•midlander•29m ago•5 comments

Germany, Other NATO Allies Sending Troops to Greenland Amid Trump Threats

https://www.newsweek.com/greenland-germany-sending-troops-nato-donald-trump-threats-11361535
4•mooreds•30m ago•0 comments