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

LG monitors silently install software through Windows Update without consent

https://videocardz.com/newz/lg-monitors-silently-install-software-through-windows-update-without-...
1•baranul•4m ago•0 comments

US lawmakers urge Trump administration to ban Chinese memory chips

https://www.ft.com/content/9e7cdf3c-2e52-492f-afeb-b63d86a53ce6
1•giuliomagnifico•5m ago•0 comments

IEA Warns World Has Just Weeks to Avoid Hormuz Economic Shock

https://oilprice.com/Latest-Energy-News/World-News/IEA-Warns-World-Has-Just-Weeks-to-Avoid-Hormuz...
2•baranul•11m ago•0 comments

Show HN: GPT-5.6 Sol vs. Claude Fable 5 in CNC Red Alert 2

https://system-2-arena.vercel.app/showcase/ra2?war=sol-vs-fable-lake
1•masterchef2209•12m ago•0 comments

Billion-dollar California salad company exploits undocumented migrants (2014)

https://www.theguardian.com/us-news/2014/nov/23/billion-dollar-california-salad-company-exploits-...
1•cramer4next•12m ago•0 comments

Show HN: Fable 5 vs Kimi K3 in CNC Red Alert 2

https://system-2-arena.vercel.app/showcase/ra2?war=fable-vs-kimi-1
1•masterchef2209•13m ago•0 comments

Detroit ranked as having the worst air quality in the world

https://www.clickondetroit.com/news/local/2026/07/16/detroit-ranked-as-having-the-worst-air-quali...
1•geox•14m ago•0 comments

India's largest nuclear power plant Kudankulam exposed in data breach

https://www.reuters.com/world/india/files-relating-indias-largest-nuclear-power-plant-kudankulam-...
2•thunderbong•17m ago•0 comments

The cost of forming an LLC in every US state (in 2026)

https://www.incorpassist.com/blog/us-states/real-cost-to-form-an-llc-by-state
1•incorpassist•18m ago•1 comments

Ask HN: Will Oracle's fall from grace be good for Open Source

1•lifeisstillgood•20m ago•0 comments

Math Corps 2026

https://alexkontorovich.wordpress.com/2026/07/18/math-corps-2026-visiting-day-directors-remarks/
1•mathgenius•23m ago•0 comments

Amnesty UK self-reports to watchdog after calling women's centre 'anti-rights'

https://www.theguardian.com/society/2026/jul/16/amnesty-uk-self-reports-to-watchdog-calling-women...
2•padda•23m ago•0 comments

GoodJsCode, a practical guide to writing cleaner JavaScript

https://github.com/pH-7/GoodJsCode
1•phenrys•25m ago•0 comments

'AI code is insane trash' – David Gerard [video]

https://www.youtube.com/watch?v=EwLW11Ucnps
1•baranul•25m ago•0 comments

Show HN: PrettyShot – A fast, local-first screenshot beautifier

https://www.prettyshot.site
1•prassamin•27m ago•0 comments

Conversation Steganography

https://github.com/nethical6/conversation-steganography
1•throwaway_19sz•28m ago•0 comments

We Built Our Knowledge Base

https://www.cerebras.ai/blog/how-we-built-our-knowledge-base
1•samuel246•35m ago•0 comments

Strip-Searched at the Serbian Border

https://psychotechnology.substack.com/p/strip-searched-at-the-serbian-border
2•eatitraw•37m ago•0 comments

Show HN: Go Micro – An agent harness and service framework in Go

https://github.com/micro/go-micro
1•asim•38m ago•0 comments

Screwing Up

https://www.seangoedecke.com/screwing-up/
1•gfysfm•40m ago•0 comments

Show HN: Workaround – Unstar GitHub Repos in Bulk

https://workaround.run/
1•yusveng•44m ago•0 comments

Where Your Mind Goes When You Stop

https://lanternhours.substack.com/p/where-your-mind-goes-when-you-stop
1•cuongvtran•45m ago•0 comments

Google workers demand layoff protections amid AI boom in petition to CEO

https://www.theguardian.com/technology/2026/jul/16/google-workers-layoff-protections-ai
4•tcp_handshaker•48m ago•0 comments

The Open-Soruce Big Bang

https://webaligo.bearblog.dev/the-open-soruce-big-bang/
1•ilreb•49m ago•0 comments

Ukraine's Dr. Strangelove – a rocket designer with dubious past sets out to

https://www.theatlantic.com/national-security/2026/07/ukraine-denys-shtilerman-drone-missile/687931/
2•bell-cot•49m ago•1 comments

Avoidance 1.0: Making Every Run Fairer

https://simonskinner.me/blog/avoidance-1-0-making-every-run-fairer
1•vultuk•51m ago•0 comments

Beaver who escaped to find mate welcomes first kit

https://www.bbc.com/news/articles/c70gz4zpv97o
3•1659447091•52m ago•0 comments

Trump administration is dictating access to frontier AI models

https://www.cnbc.com/2026/07/17/white-house-ai-access-anthropic-openai.html
4•tosh•52m ago•1 comments

Warum fällt Abnehmen ab 35 plötzlich so schwer?

https://substack.com/profile/524692702-ketosana94/note/c-296895670
1•ketosana94•54m ago•0 comments

Pelican on a bicycle is a good benchmark, right?

https://playcode.io/blog/macbook-svg-benchmark
2•ianberdin•56m ago•0 comments