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

A Universe from Three Sectors: Recovering TradeWars 2002's Map from Its RNG Seed

https://mattmichie.com/2026/07/14/a-universe-from-three-sectors/
1•influx•3m ago•0 comments

Looking for a remote internship (Fall/Winter/Spring 2026)

1•cnnadozi•4m ago•0 comments

JOBCV.IO - Free Resume Maker Online – Build Your Professional CV

https://jobcv.io/en
1•grossos•4m ago•1 comments

Cross sectioning insects in an electron microscope with a femtosecond laser

https://www.youtube.com/watch?v=NwhVJ7cv9B4
1•fallinditch•5m ago•0 comments

Casberi: Apps in one feed, no account, everything on-device

https://casberi.app
1•alexchopan•6m ago•0 comments

Manage your Claude Code agents in Raycast

https://github.com/vmc-7645/claude-fleet
1•vmc_7645•7m ago•1 comments

Laptop touchpad stopped registering clicks? try this

2•LandOfMightDev•8m ago•0 comments

Deep dive: Quad storage for optimal throughput and latency

https://blog.canoozie.net/four-integers-and-a-lot-of-wrong-assumptions/
1•jtregunna•9m ago•1 comments

OpenAI Launches Hardware for Codex

https://www.theverge.com/ai-artificial-intelligence/965901/openai-hardware-codex-micro-launch
1•thunderbong•11m ago•0 comments

Consultant Bench

https://innolitics.com/articles/consultant-benchmark/
1•innolitics•12m ago•1 comments

The lost joy of music piracy

https://www.pigeonsandplanes.com/read/music-piracy-what-cd-oink-nine-inch-nails-streaming
3•mcgin•20m ago•0 comments

How TypeScript devs can avoid getting pwned by malicious packages

https://builtbystef.com/blog/supply-chain-security/
1•builtbystef•22m ago•0 comments

Reynard: A real Firefox web browser for iOS 13 or later

https://github.com/minh-ton/reynard-browser
1•AbuAssar•30m ago•0 comments

Stop saying that AI is just a tool and it only matters how it is used

https://www.frank.computer/blog/2025/05/just-a-tool.html
5•cratermoon•35m ago•3 comments

Business Finance Tips for Small Business Owners in the UAE and India

https://adilrashidlone.substack.com/p/business-finance-tips-for-small-business
2•digitaldaddyme•35m ago•0 comments

Panix – the oldest commercial Internet provider in New York

https://panix.com/
1•uproarchat•37m ago•0 comments

Show HN: Complete the survey and get personal free AI toothpaste recommendation

https://tpmme.me
1•notlibrary•38m ago•0 comments

Which founders created the most wealth for others?

https://wealth-creators-omega.vercel.app
2•probe•39m ago•0 comments

Don't Pee on My Leg and Call It Science

https://stager.tv/?p=4381
1•the-mitr•40m ago•0 comments

Show HN: AI Starter Templates in NextJS and OpenAI

https://suhasbhairav.com/ai-templates
1•bsuhas•42m ago•1 comments

WSJ: The AI Backlash Has Tech Executives Fearing for Their Lives

https://www.wsj.com/us-news/the-ai-backlash-has-tech-executives-fearing-for-their-lives-30c43972
10•testfoobar•48m ago•4 comments

AI Is Not a Tool

https://theconvivialsociety.substack.com/p/your-ai-is-not-a-tool
6•crowdhailer•49m ago•2 comments

How to make AI safe and free of America and China

https://www.economist.com/leaders/2026/07/15/how-to-make-ai-safe-and-free-of-america-and-china
3•andsoitis•59m ago•0 comments

Beware Change-Blocking Priors

https://www.overcomingbias.com/p/beware-change-blocking-priors
3•paulpauper•1h ago•0 comments

There is no AI in Team

https://arnoldkling.substack.com/p/there-is-no-ai-in-team
3•paulpauper•1h ago•0 comments

Show HN: A Lightweight, open-source always-on-top local AI desktop companion

https://github.com/Rupak182/heychat/releases/tag/v0.1.0
2•Rupak182•1h ago•0 comments

An Interactive Map of AI

https://artifipedia.com/map
16•ceprompts•1h ago•8 comments

Crystal ML Library: Autograd, Tensors, Neural Networks, Optimizers

https://github.com/skuznetsov/cogni-ml
3•zX41ZdbW•1h ago•0 comments

My Throw Decides My Aim

https://thegustafson.com/blog/my-throw-decides-my-aim
10•usernotfoundrn•1h ago•1 comments

If you want to create a button from scratch, you must first create the universe

https://madcampos.dev/blog/2026/07/accessibility-from-scratch/
33•treve•1h ago•4 comments