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

GitHub language bar is lying (how to fix it)

https://mkennedy.codes/posts/your-github-language-bar-is-lying-and-how-to-fix-it/
1•lumpa•1m ago•0 comments

SpaceX no longer needs NASA, and that's a problem for America's space agency

https://arstechnica.com/space/2026/10/spacex-no-longer-needs-nasa-and-thats-a-problem-for-america...
1•rbanffy•1m ago•0 comments

But Seriously, Fuck Cloudflare

https://kamiscorner.xyz/blog/fuck-cloudflare/
1•surprisetalk•5m ago•0 comments

What it costs to moderate 500 daily doodles with Jev

https://johalloran.dev/blog/squigdle-moderation
1•jpohalloran•11m ago•1 comments

You Can Turn Off the New MacBook Pro's Touchscreen Functionality

https://www.macrumors.com/2026/10/29/macbook-pro-touch-input-can-be-turned-off/
3•throwaway270925•11m ago•0 comments

Sony is launching the "ELF-MN1," a compact 6-inch Spatial Reality Display

https://xyn.sony.net/en/news/2026-srd-elf-mn1_release
1•cyrc•11m ago•1 comments

Show HN: NotchMetrics – Revenue dashboard in your MacBook's notch

https://notchmetrics.com
2•haxzie•12m ago•0 comments

Ginux: Independent rust based Linux implementation

https://github.com/gmkurtzer/ginux
4•cycomanic•13m ago•0 comments

What to consider if a company that made AI-related job cuts wants you back

https://apnews.com/article/ai-jobs-layoffs-hiring-rebounding-skills-04662acffb7beba822129118dde3f0a7
3•zomtorg•14m ago•0 comments

Senators Demand Meta Answer for 'Pervert Glasses'

https://www.404media.co/senators-wyden-markey-letter-to-meta-smart-glasses/
3•mooreds•15m ago•0 comments

Decode kernel panic from QR Code photo

https://gist.github.com/skorotkiewicz/c59e591c26661cb52b06afc42d8ac546
1•modinfo•15m ago•0 comments

Mosquito Lasers

https://www.nytimes.com/2026/10/30/briefing/mosquito-lasers.html
1•samch•15m ago•1 comments

How to Learn ML in 2026 interview

https://vickiboykis.com/2026/10/17/how-to-learn-ml-in-2026-interview/
1•mooreds•19m ago•0 comments

We Are All Conservatives Now

https://carlorimbotti.substack.com/p/we-are-all-conservatives-now
3•robertvandermaa•21m ago•0 comments

An Ultimate Satellite Hacking Handbook

https://rdnsec.info/articles/satellite-hacking-handbook/
1•rdn86•23m ago•0 comments

Agent Memory Challenge Cycle 2 Closes in 2 Days:Text, Code and Multimodal Tracks

https://x.com/AgentMemoryL/
1•MemoryEnthusias•25m ago•0 comments

Lula won: the same swing, in all twenty-seven states

https://globalelectionsimulator.com/daily/how-lula-won/
1•matheusmoreira•27m ago•0 comments

Aluna – An Ecological Warning by the Kogi People [video]

https://www.youtube.com/watch?v=ftFbCwJfs1I
1•Bluestein•27m ago•0 comments

Avoid Public Functions Calling Other Public Functions

https://matklad.github.io/2026/10/29/pub-calls-pub.html
1•ibobev•28m ago•0 comments

'Trust but verify'; or, 'the correctness ratchet'

https://smallcultfollowing.com/babysteps/blog/2026/10/30/trust-but-verify/
1•ibobev•29m ago•0 comments

Google Faces Criminal Probe over 816 Acres Cleared for Finnish AI Data Center

https://www.tomshardware.com/tech-industry/data-centers/criminal-investigation-launched-into-goog...
2•entryleveljobsc•30m ago•0 comments

Show HN: Entry-level jobs that are entry-level

https://twitter.com/bigsmilecartoon/status/2115808284129235182
1•entryleveljobsc•32m ago•0 comments

Harness Engineering 101

https://isuruwijesiri.com/harness-engineering-101/
1•mooreds•32m ago•0 comments

Mysetup.is

https://mysetup.is
1•edvinthor•32m ago•0 comments

Agentic Animation Tool – think After Effects for your agents

https://github.com/agentfxhq/agentfx
2•drzivil•33m ago•1 comments

Show HN: Tyrtulia, a headless forum with no passwords, made for the terminal

https://en.andros.dev/blog/b5c8c6aa/i-built-a-forum-with-no-interface-no-passwords-made-for-the-t...
2•andros•34m ago•0 comments

Show HN: JoinJSON – Merge, diff and convert JSON files in the browser

https://www.joinjson.com/
1•manikandan3721•36m ago•0 comments

Vibewright

https://github.com/neodk2004/vibewright/
1•neodk•36m ago•0 comments

Millstone: Deterministic engine that characterizes undeciphered corpora

https://github.com/Ecm83/millstone
1•EnricCM83•36m ago•0 comments

Sikaru: self-improving agents, with the lab built in

https://www.sikaru.ai/blog/introducing-sikaru
2•shockrobortyy•39m ago•0 comments