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

'Rehabilitated' postwar Germany's government was full of Nazis, study reveals

https://www.timesofisrael.com/study-reveals-how-rehabilitated-postwar-west-germanys-government-wa...
1•kome•2m ago•0 comments

I built an autonomous rover from scratch in my mom's basement

https://twitter.com/SohailMSayed/status/2088365274768572681
1•okincilleb•2m ago•1 comments

The CEO who fired 900 people on Zoom just before Christmas wants his job back

https://www.ctvnews.ca/business/article/the-ceo-who-fired-900-people-on-zoom-just-before-christma...
1•healsdata•2m ago•0 comments

UK Bans Disposable BBQs

https://www.independent.co.uk/news/uk/home-news/disposable-bbq-ban-burnham-wildfires-heatwave-b30...
1•denysonique•6m ago•0 comments

Show HN: A simple, powerful, and cheaper email verification API

https://emailverifier.dev/
1•usamaejaz•6m ago•0 comments

Amélie's graphics library: small cross-platform RHI, D3D12, Metal 4 and Vulkan

https://github.com/AmelieHeinrich/agfx
2•klaussilveira•10m ago•0 comments

Deploying and Installing SUSE AI

https://documentation.suse.com/suse-ai/1.0/html/AI-deployment/index.html
2•indigodaddy•14m ago•0 comments

Seed Oils as a Driver of Heart Disease – Zero Acre Farms

https://www.zeroacre.com/white-papers/seed-oils-as-a-driver-of-heart-disease
1•bilsbie•14m ago•0 comments

DeepSeek V4 Pro goes GA: 1.6T MoE flagship exits preview

https://ainexusdaily.vercel.app
3•qrify_app•16m ago•0 comments

Show HN: Wevna – Local-first runtime dashboard for Node.js back ends

https://github.com/wevna/wevna
2•boluajy•18m ago•0 comments

The Slow Death of VBulletin, and Why It Isn't Over

https://sudosecurity.org/forum-archaeology-vbulletin-slow-death/
1•SudoSH•18m ago•0 comments

Everything is about to "go dark"

https://blog.cryptographyengineering.com/2026/08/14/everything-is-about-to-go-dark/
2•vslira•20m ago•0 comments

Make a 6-Tesla-class high-temperature superconducting dipole magnet at 4.2 K

https://journals.aps.org/prab/abstract/10.1103/4nhs-bkwh
3•supermagnet•23m ago•0 comments

Apple using push notifications to alert customers to spyware attacks

https://techcrunch.com/2026/08/13/if-apple-sends-you-a-push-notification-alerting-you-to-a-spywar...
1•worik•24m ago•0 comments

OpenOliver – A Community of Human Chatbots

https://www.openoliver.com/
1•0livercoria•24m ago•0 comments

AI-Lab: Classical AI and search algorithms implemented in Python

https://github.com/ob22a/ai-lab
1•ob22a•25m ago•0 comments

Autonomous drones locate Flock cams, cover lenses with black paint

2•spottedmarley•25m ago•0 comments

Systemic Risks in the Managed PostgreSQL Industry: Extension Risks Are Real

https://mehmetince.net/part-1-6-systemic-risks-in-the-managed-postgresql-industry-extension-risks...
1•latchkey•26m ago•0 comments

Study links coffee consumption to metabolic health and sex hormones

https://www.oulu.fi/en/news/study-links-coffee-consumption-metabolic-health-and-sex-hormones
3•_____k•27m ago•0 comments

Amelia Earhart vanished in 1937. New evidence could find her plane

https://www.usatoday.com/story/graphics/2026/08/13/amelia-earhart-plane-clues-nikumaroro-island/9...
2•rmason•27m ago•0 comments

It's time to stop doing code reviews

https://blog.brokk.ai/its-time-to-rip-off-the-band-aid-and-stop-performing-code-reviews/
4•jbellis•28m ago•3 comments

Spectre on RISC-V Silicon

https://lukasgerlach.me/blog/2026-spectre-on-riscv-silicon-usenix/
1•mici•29m ago•0 comments

The Reason You Can't Stop Buying Stuff You Don't Need

https://comuniq.xyz/post?t=1554
2•01-_-•30m ago•0 comments

Speeding up (small) Ruby hashes with SWAR

https://byroot.github.io/ruby/performance/2026/08/13/speeding-up-ruby-hashes.html
1•fanf2•31m ago•0 comments

What's the Value of an Hour?

https://www.newyorker.com/culture/open-questions/whats-the-value-of-an-hour
1•littlexsparkee•32m ago•0 comments

Researchers uncover hidden pore network within nuclear fuel

https://news.mit.edu/2026/researchers-uncover-hidden-pore-network-within-nuclear-fuel-0813
1•rbanffy•32m ago•0 comments

What's a Platonic Biosingularity?

https://opentheory.substack.com/p/whats-a-platonic-biosingularity
2•eatitraw•36m ago•0 comments

Creel – A Vim-Driven SQL TUI for SQLite, MySQL, and Postgres

https://github.com/rsiota/creel
1•rsiota•39m ago•0 comments

Monkeys sometimes have 'pets' like humans

https://www.popsci.com/environment/monkeys-have-pets-evolution/
2•gmays•40m ago•0 comments

Show HN: Memcode ships open source OpenClaw and Hermes baseline in public beta

https://github.com/memcode-ai/memcode
1•timerwin•40m ago•0 comments