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

Don't Take the Black Pill (Text Adaptation)

https://andrewkelley.me/post/dont-take-black-pill.html
2•zdw•3m ago•0 comments

Ask HN: Points for Downvote

1•gregdaniels421•6m ago•0 comments

Show HN: FirstEmployee.ai – Start a Business

https://firstemployee.ai/
1•nadermx•8m ago•0 comments

Plug-in solar is coming. Plug-in batteries should follow

https://www.regen.co.uk/insights/plug-in-solar-is-coming-plug-in-batteries-should-follow
1•thelastgallon•10m ago•0 comments

Deep-sea vehicles spot 'alien' sharks deep beneath the waves in the Pacific

https://www.science.org/content/article/deep-sea-vehicles-spot-alien-sharks-deep-beneath-waves-pa...
2•pkaeding•16m ago•0 comments

The world first agentic AI radio

https://www.twitch.tv/newsmyimaginationai
3•myimaginationai•25m ago•1 comments

Recurse Center Halftime Reflection

https://holistudio.github.io//2025/11/02/RC-half/
2•luu•32m ago•0 comments

Four Time Scales for Technology Development and Deployment

https://rodneybrooks.com/four-time-scales-for-technology-development-and-deployment/
6•jeffreyrogers•41m ago•0 comments

Design Thinking Is B.S. (2018)

https://www.fastcompany.com/90166804/design-thinking-is-b-s
4•walterbell•50m ago•0 comments

DeepMind Disbands AlphaFold Team, Pivots to Gemini

https://unusualwhales.com/news/deepmind-disbands-alphafold-team-gemini-pivot
4•gmays•52m ago•1 comments

Building agents that survive their own execution

https://conol.ai/blog/building-agents-that-survive-their-own-execution
2•greatony•58m ago•0 comments

When random.bytes() runs but doesn't work

https://insider.btcpp.dev/p/when-randombytes-runs-but-doesnt
2•Funes-•59m ago•0 comments

Show HN: I'm a 15 Year Old Wannabe Engineer, This Is a Cycloidal Gearbox I Built

https://github.com/tom-ilan/cycloidal_gearbox
25•tomilan•1h ago•3 comments

What 'Pluribus' Gets Right About the Hive Mind (2025)

https://www.psychologytoday.com/us/blog/priceless/202512/what-pluribus-gets-right-about-the-hive-...
2•walterbell•1h ago•0 comments

Portal: Current Events

https://en.wikipedia.org/wiki/Portal:Current_events
5•adm4•1h ago•0 comments

Fuck the Algorithm. Own Your Data

https://github.com/adnqcr7-code/privacy-yt-downloader
3•kairos_agent•1h ago•0 comments

Living in the Math World Means Threading the Needle

https://www.quantamagazine.org/hong-wang-wins-2026-fields-medal-the-third-woman-ever-20260723/
3•gmays•1h ago•0 comments

Show HN: CostPerPrompt – Live AI API pricing and real-workload cost calculators

https://costperprompt.com/
3•ahmed_hassan7•1h ago•0 comments

Inverseminar

https://phys.org/news/2026-07-inverting-seminar-recover-scientific-papers.html
4•sundarurfriend•1h ago•0 comments

'Death by organ donation' floated for patients approved for euthanasia

https://nationalpost.com/news/death-by-organ-donation-for-maid-patients
3•walterbell•1h ago•0 comments

Hiring FDE's (full stack software eng) // 100K+ & equity // AI for Manufacturing

https://www.tryharmony.ai/
2•georgeharmony•1h ago•0 comments

I made a free directory to submit your games

https://www.twelve.games
3•mattmerrick•1h ago•0 comments

Token diplomacy: How China is shaping the AI future

https://www.semafor.com/article/07/28/2026/token-diplomacy-how-china-is-shaping-the-worlds-ai-future
3•qwikhost•1h ago•2 comments

Bessent and the Fed help Japan reverse months of yen losses

https://www.japantimes.co.jp/business/2026/08/01/economy/us-treasury-yen-support/
6•mikhael•1h ago•0 comments

The Linux distro and desktop brawler

https://distrofighter.com/
6•ashitlerferad•1h ago•0 comments

AUR Packages Adoption And Pushes Disabled

https://lists.archlinux.org/archives/list/aur-general@lists.archlinux.org/message/YPJ3FQYJTJXXY3R...
2•Alien1Being•1h ago•0 comments

Go 1.27 Interactive Tour

https://victoriametrics.com/blog/go-1-27/index.html
52•Hixon10•1h ago•8 comments

ASRock BC-250: Building the Budget Steam Machine

https://plug-world.com/posts/2026/asrock-bc250-the-budget-steam-machine/
17•plug_world•1h ago•1 comments

Ask HN: ChatGPT free tier just stopped working, is this just me?

4•jacquesm•1h ago•0 comments

People Who Called for Averting Nuclear War Are Calling for AI Slowdown

https://allevato.me/2026/08/01/rome-declaration
3•kukanani•1h ago•1 comments