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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo ago
Oh yes I agree with you. It may become a big push to convince my org to do that

Ask HN: Why are people using Claude or ChatGPT when Gemini is free?

1•muunbo•6m ago•0 comments

Trump launches $1M 'gold card' immigration visas

https://www.bbc.com/news/articles/cj4q1lddj8go
3•e2e4•11m ago•0 comments

Are there Proton Drive alternatives with true client-only key handling?

1•hasanur_m•19m ago•0 comments

OpenAI (2015)

https://openai.com/index/introducing-openai/
1•vinhnx•20m ago•0 comments

Shapes Inc founders committed the cardinal sin of mass emailing by CCing

https://twitter.com/Zencep_NA/status/1998965773126218184
1•matthewsh•22m ago•1 comments

The Wild West tale of the first cow-buffalo hybrid

https://www.popsci.com/science/cow-buffalo-hybrid-history/
1•gmays•22m ago•0 comments

A list of parks around the world that are perfect to sit down and enjoy a book

https://www.placestoread.xyz/
2•animal_spirits•24m ago•0 comments

Instagram gives users control of their algorithms in new feature

https://abcnews.go.com/GMA/Living/instagram-users-control-algorithms-new-feature/story?id=128252102
2•SilverElfin•27m ago•0 comments

Oil Tanker U.S. Seized Has Faked Its Location Before, Data Shows

https://www.nytimes.com/2025/12/10/us/politics/oil-tanker-venezuela-tracking-data.html
4•jbegley•27m ago•2 comments

High Performance SSH/SCP

https://www.psc.edu/hpn-ssh-home/
1•gslin•34m ago•0 comments

Show HN: DocLet – End-to-end encrypted storage with user-owned key branches

https://doclet.app/
1•hasanur_m•36m ago•0 comments

Incomplete List of Mistakes in the Design of CSS

https://wiki.csswg.org/ideas/mistakes
12•OuterVale•36m ago•1 comments

Oracle Credit Risk Gauge Deteriorates After Earnings Report

https://www.bloomberg.com/news/articles/2025-12-10/oracle-credit-risk-gauge-deteriorates-after-ea...
3•zerosizedweasle•37m ago•0 comments

Building Games for Old Retro 1985 Hardware is fun

https://www.youtube.com/watch?v=n5fBdYuIKqg
1•bane•39m ago•0 comments

Can Modern Linux Fit on a 1.44mb Floppy? [video]

https://www.youtube.com/watch?v=SiHZbnFrHOY
2•geerlingguy•39m ago•0 comments

Genomes of 24,000 previously unknown microbes revealed by new tools

https://phys.org/news/2025-11-genomes-previously-unknown-microbes-revealed.html
1•PaulHoule•47m ago•0 comments

Nvidia-backed Starcloud trains first AI model in space

https://www.cnbc.com/2025/12/10/nvidia-backed-starcloud-trains-first-ai-model-in-space-orbital-da...
1•neilfrndes•48m ago•0 comments

Neuralink overview, fall 2025 [video]

https://www.youtube.com/watch?v=QJdgHXyJh7M
1•satvikpendem•50m ago•0 comments

Why RSS Matters

https://werd.io/why-rss-matters/
4•gaws•56m ago•0 comments

Claude Code Plugins for App Store Compliance Checking

https://github.com/ophydami/gatekeeper-marketplace
1•handfuloflight•1h ago•0 comments

Back to the 70s with Serverless (2020)

https://cdegroot.com/devops/cloud/2020/12/18/serverless.html
1•kunley•1h ago•0 comments

Scientists discover a new state of matter at Earth's center

https://www.sciencedaily.com/releases/2025/12/251209043053.htm
1•ashishgupta2209•1h ago•0 comments

Nvidia isn't Enron So What is it?

https://www.wheresyoured.at/nvidia-isnt-enron-so-what-is-it/
5•PaulDavisThe1st•1h ago•0 comments

Will Larson Reflects on his book, Staff Engineer [video]

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

Vibe coding is mad depressing

https://law.gmnz.xyz/vibe-coding-is-mad-depressing/
105•dirtylowprofile•1h ago•40 comments

Errors and Zig

https://notes.eatonphil.com/errors-and-zig.html
4•ibobev•1h ago•0 comments

Unrolling Loops

https://xania.org/202512/10-loop-unrolling
2•ibobev•1h ago•0 comments

30 Years Ago Windows 95 Changed Everything

https://www.goto10retro.com/p/30-years-ago-windows-95-changed-everything
2•ibobev•1h ago•1 comments

CEO of Chinese robotic company post video of himself getting kicked by his robot

https://www.businessinsider.com/engineai-ceo-robot-kick-video-2025-12
4•teleforce•1h ago•0 comments

Ghostly solar neutrinos caught transforming carbon atoms deep underground

https://phys.org/news/2025-12-ghostly-solar-neutrinos-caught-carbon.html
3•wglb•1h ago•1 comments