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

All useful document at my company is now AI generated

https://www.reddit.com/r/developersIndia/s/56LVBJKthJ
1•justforreading•1m ago•0 comments

Made a Tool to Streams Changes from Microsoft SQL Server to Apache Kafka

https://github.com/Niyko/Athena
1•hyvr_official•2m ago•1 comments

Reading The Motley Fool never made anyone rich

https://www.researchtesseract.com/blog/reading-the-motley-fool-never-made-anyone-rich
1•BenetBani•2m ago•0 comments

Cache hit rates of Inference are more meaningful than the headline costs

https://dirac.run/posts/cache-hit-rates-agents
2•mellosouls•2m ago•1 comments

How thread locals work on macOS

https://yuraiz.github.io/dyld/
1•yuraiz•3m ago•0 comments

The Website Specification

https://specification.website/
2•k1m•3m ago•0 comments

Video shows an evolved bird nest design that leaves snakes with almost no way in

https://www.yahoo.com/lifestyle/articles/viral-video-shows-tiny-birds-212000935.html
1•gurjeet•7m ago•0 comments

A simple Common Lisp web app (2025)

https://www.scotto.me/blog/2025-04-30-a-simple-common-lisp-web-app/
1•tosh•8m ago•0 comments

Climate tech companies are going public. What's next?

https://www.technologyreview.com/2026/05/28/1138067/climate-tech-ipos/
1•joozio•8m ago•0 comments

Qwe: A simple file-first atomic version control system

https://github.com/mainak55512/qwe
1•thunderbong•10m ago•0 comments

Show Faith by Works – George

https://untitledsource.substack.com/p/show-faith-by-works
1•untiledsource•11m ago•0 comments

Pollen: The Book Is a Program

https://docs.racket-lang.org/pollen/
2•tosh•21m ago•0 comments

Ask HN: Did anyone noticed – Claude vs. Claude generated code act different?

1•kocialnews•23m ago•0 comments

Demographics may be breaking traditional labor market signals

https://www.reuters.com/business/feds-williams-productivity-shifts-hard-spot-real-time-2026-05-28/
2•latentframe•33m ago•0 comments

Blue Origin faces months of delays after rocket explosion damages launch pad

https://www.reuters.com/business/aerospace-defense/blue-origin-faces-months-delays-after-rocket-e...
2•JumpCrisscross•35m ago•0 comments

The National Automated Highway System That Almost Was (2013)

https://www.smithsonianmag.com/history/the-national-automated-highway-system-that-almost-was-6302...
2•downbad_•45m ago•0 comments

The U.S. Has Found a Way to Down a Drone Without Spending $1M

https://www.wsj.com/world/the-u-s-has-found-a-way-to-down-a-drone-without-spending-1-million-848f...
2•JumpCrisscross•51m ago•0 comments

Show HN: GoodSender – the email API for makers and AI agents

https://goodsender.com/
2•efsher_azoy2•52m ago•0 comments

The ~500kB NBSDGames 6 managed to be published ahead of GTA 6

https://github.com/abakh/nbsdgames/releases
3•abakh•55m ago•0 comments

Access Advance Licensor Sues Snap Inc. For AV1 and HEVC Patent Infringement

https://www.accessnewswire.com/newsroom/en/electronics-and-engineering/access-advance-licensor-su...
2•maxloh•56m ago•0 comments

Why Custom Attributes in .NET Give Me Nightmares

https://blog.washi.dev/posts/custom-attributes-and-why-they-suck/
2•jandeboevrie•57m ago•0 comments

Alibaba DAMO Academy Releases GPU Version of Solver

https://www.moomoo.com/news/post/70684711/alibaba-damo-academy-releases-gpu-version-of-solver-for...
2•devy•59m ago•0 comments

Avian Visitors

https://theodore.net/projects/AvianVisitors/
11•fdb•59m ago•0 comments

I'm a photographer. I built a DSL for multi-agent workflows

https://github.com/anhonestboy/agentflow
5•westhills•1h ago•1 comments

A Complexity Theory of AI Value Accrual

https://twitter.com/hypersoren/status/2056866328003174707
3•pretext•1h ago•0 comments

Google infringed trademark allowing competitors use brand name as an ad keyword

https://economictimes.indiatimes.com/tech/technology/ettech-explainer-why-google-was-fined-rs-30-...
6•alok-g•1h ago•1 comments

Dell Confirms XPS Laptop with Nvidia N1X at Computex

https://videocardz.com/newz/dell-confirms-xps-laptop-with-nvidia-n1x-at-computex
4•theanonymousone•1h ago•0 comments

High Tech Heroes #37: Sherwin Gooch Interviews Jef Raskin (1989?)

https://www.youtube.com/watch?v=1qvrOEExlps
3•OhMeadhbh•1h ago•0 comments

Codex generated code that bypasses security constraints

https://twitter.com/sluongng/status/2060746160558543217
5•nomilk•1h ago•0 comments

Why Don't Computers Just Use One Type of Memory?

https://www.youtube.com/watch?v=TfhL5kBiQVI
4•randfur•1h ago•0 comments