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

I'm a Philosophy Professor. Here's Why I'm Training AI to Replace Me

https://www.chronicle.com/article/im-a-philosophy-professor-heres-why-im-training-ai-to-replace-me
1•KnuthIsGod•2m ago•0 comments

The world of Japanese train melodies [video]

https://www.youtube.com/watch?v=-KxQIEhsFQk
1•vinhnx•3m ago•0 comments

The Vientiane Mystery: When a Taxi Apps Randomly Stops Working

https://gist.github.com/Usernameisalreadytaken5/a0bc0e204008b9ed1b404437db5f59cd
1•jondoe•4m ago•0 comments

Show HN: Bgbgone – local Mac background remover CLI – MIT

https://github.com/Arthur-Ficial/bgbgone
1•franze•6m ago•0 comments

C++: The Programming Language Cover Raises Unanswered Questions

https://devblogs.microsoft.com/oldnewthing/20260401-00/?p=112180
1•birdculture•6m ago•0 comments

The "Cat-Cam": Using Go and an Old Nokia Android to Catch a Midnight Intruder

https://medium.com/@premkumarbhaskal/the-cat-cam-using-go-and-an-old-nokia-android-to-catch-a-mid...
2•Pbhaskal•6m ago•1 comments

Using the Screen Capture API to record a browser window

https://alexwlchan.net/2026/record-browser-video/
1•Tomte•9m ago•0 comments

Ask HN: What are some agent-coded masterpieces?

1•xyzal•9m ago•0 comments

A Little Explanation of Little's Law

https://rugu.dev/en/blog/littles-law/
2•signa11•10m ago•0 comments

The US Needs Mechanics and Electricians.Big Business Is Spending to Create Some

https://www.wsj.com/business/autos/the-u-s-needs-mechanics-and-electricians-big-business-is-spend...
1•KnuthIsGod•11m ago•0 comments

The Grad Student Who Broke Microplastics Research

https://drstanfield.com/en-eu/blogs/articles/the-grad-student-who-broke-microplastics-research
2•mpweiher•27m ago•0 comments

Memory Caching: RNNs with Growing Memory

https://arxiv.org/abs/2602.24281
1•dmichulke•29m ago•0 comments

Writing your own print function in C without Libc

https://linux-is-best.pckt.blog/writing-your-own-print-function-16xt8wv
1•ghodawalaaman•35m ago•0 comments

Spotify no OAuth,no premium web API fetching

1•nntlol•35m ago•0 comments

Nike can't just do it any more

https://economist.com/1843/2026/06/05/nike-cant-just-do-it-any-more
1•andsoitis•38m ago•0 comments

Project the aircraft passing overhead onto your ceiling, in real time

https://github.com/cpaczek/skylight
2•phantomathkg•42m ago•1 comments

Show HN: Kyushu – A self-hostable WASM sandbox for JavaScript workers

https://kyushu.dev/
1•le_chuck•47m ago•0 comments

Show HN: WinkTerm – AI that shares the same PTY as you in the terminal

https://github.com/Cznorth/winkterm
1•Cznorth•50m ago•0 comments

Help Nearby – humanitarian map with UN data integration

https://help-nearby.org
1•Hyrezyxx•56m ago•0 comments

Retrospective

https://neverworkintheory.org/2024/03/21/retrospective.html
1•jruohonen•56m ago•0 comments

Dimitri Bertsekas

https://en.wikipedia.org/wiki/Dimitri_Bertsekas
1•tosh•59m ago•0 comments

Are we approaching a new AI winter?

https://adlrocha.substack.com/p/adlrocha-are-we-approaching-a-new
2•adlrocha•59m ago•0 comments

Show HN: About Lightweight, S3-compatible object storage

https://kodiqa-solutions.github.io/VaultS3/
1•open_source_new•1h ago•0 comments

Thoughts on starting new projects with LLM agents

https://eli.thegreenplace.net/2026/thoughts-on-starting-new-projects-with-llm-agents/
2•wrxd•1h ago•0 comments

Show HN: AI pre-screening CIS counterparties before onboarding

https://agenstry.com/agents/cis-secondary-sanctions-a2a.vassiliy-lakhonin.workers.dev
1•vassilbek•1h ago•0 comments

How LLMs Work: A Friendly Map for Humans

https://oreoro.github.io/posts/how-llms-actually-work-friendly-guide/
1•alexander2002•1h ago•0 comments

Police Tussle with Diabetes Experts at Ada Meeting

https://www.medpagetoday.com/special-reports/exclusives/121619
1•pigeons•1h ago•0 comments

What Happened in Tanzania on October 29?

https://www.youtube.com/watch?v=hGI5O56yuxo
1•daesorin•1h ago•0 comments

How much do amd64 microarchitecture levels help in Go?

https://twitter.com/lemire/status/2063358266885685710
2•tosh•1h ago•1 comments

Into the Personal-Website-Verse (2019)

https://matthiasott.com/articles/into-the-personal-website-verse
2•downbad_•1h ago•0 comments