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

Astronomers discover black hole 'star'

https://www.theguardian.com/science/2026/aug/12/astronomy-discovery-new-cosmic-object-black-hole-...
1•spopejoy•1m ago•0 comments

Always Go to the Funeral (2005)

https://www.npr.org/2005/08/08/4785079/always-go-to-the-funeral
1•downbad_•1m ago•0 comments

The most relaxing song in the world

https://journals.sagepub.com/doi/10.1177/03057356221081169
1•freeduck•1m ago•1 comments

Finland's Zero Homeless Strategy: Lessons from a Success Story (2021)

https://oecdecoscope.blog/2021/12/13/finlands-zero-homeless-strategy-lessons-from-a-success-story/
1•downbad_•1m ago•0 comments

The West has given China the keys to the medicine cabinet

https://www.ft.com/content/5924d083-b5a4-4f95-8c2d-400f2b914159
1•JumpCrisscross•1m ago•0 comments

Sub-Minute Techno-Economics

https://untangle.bio/
1•biobits•4m ago•1 comments

Persistent SARS-CoV-2 RNA and Gut Immune Dysfunction in Long Covid

https://biorxiv.org/cgi/content/short/2026.08.07.743616
1•thenerdhead•5m ago•0 comments

We migrated the database behind every Vercel build

https://vercel.com/blog/how-we-migrated-the-database-behind-every-vercel-build
2•j0selit0•6m ago•0 comments

Fibonada.py

https://gist.github.com/gregsadetsky/cdf5a52542cf3ba4c92bc836df6dc722
2•gregsadetsky•7m ago•0 comments

µ-Boosting Your CMake Productivity with Environment Variables

https://www.kdab.com/%C2%B5-boosting-your-cmake-productivity-with-environment-variables/
2•jandeboevrie•10m ago•0 comments

Apple Can't Delay App Store Fee Fight While Waiting on Supreme Court

https://www.macrumors.com/2026/08/11/app-store-epic-games-fee-fight-proceeds/
3•dabinat•12m ago•0 comments

U.S. and Ukrainian Forces Went Head-to-Head in an Exercise. Ukraine's Drones Won

https://www.wsj.com/politics/national-security/u-s-and-ukrainian-forces-went-head-to-head-in-an-e...
5•defly•14m ago•0 comments

World oil and gas demand could grow until 2050, IEA says after U.S. pressure

https://www.cbc.ca/news/climate/iea-energy-outlook-2025-9.6976107
1•xbmcuser•15m ago•0 comments

How Claude's watermarking (probably) works

https://johnjwang.com/post/2026/08/12/how-claude-watermarking-probably-works/
1•johnjwang•16m ago•0 comments

Delta: Multiplayer environment for coding agents from the Zed team

https://delta.dev/
1•rohitpaulk•16m ago•0 comments

Brazil Suspends Discord Livestreaming After Teenager's Death

https://www.bloomberg.com/news/articles/2026-08-12/brazil-suspends-discord-livestreaming-after-te...
2•wslh•16m ago•1 comments

Natural Language Processing Almost from Scratch

https://arxiv.org/abs/1103.0398
1•Anon84•17m ago•0 comments

AI coding startup Cognition in talks to raise at $40B valuation

https://techcrunch.com/2026/08/12/ai-coding-startup-cognition-reportedly-already-in-talks-to-rais...
2•ashurandi•17m ago•0 comments

How Silicon Valley makes its anointed fellow travelers unspeakably rich

https://prospect.org/2026/08/12/aug-2026-world-from-the-inside-baker-review/
3•dxs•19m ago•0 comments

A Hadamard matrix of order 668 has been found

https://twitter.com/sumeetrm/status/2087534215772479838
1•birriel•19m ago•0 comments

Show HN: Programmable timer web app (for gym workouts or stretching sessions)

https://timer.jotaen.net
1•jotaen•20m ago•0 comments

Why Day 0 for Nemotron 3.5 Lightning wasn't a scramble

https://modelplane.ai/blog/nemotron-3-5-lightning-day-zero
1•hasheddan•20m ago•0 comments

What is the impact of higher interest rates on PE expected returns?

https://ludovicphalippou.substack.com/p/what-is-the-impact-of-higher-interest
2•toomuchtodo•25m ago•0 comments

Plug and Pwn attack uses fake USB devices for Windows SYSTEM access

https://www.bleepingcomputer.com/news/security/plug-and-pwn-attack-uses-fake-usb-devices-for-wind...
3•speckx•25m ago•0 comments

Show HN: A better, free client for iMessage power-users

1•jmatan•26m ago•0 comments

Adults have struggled to set rules for AI in school. These teens figured it out

https://text.npr.org/nx-s1-5853571
4•mooreds•27m ago•0 comments

Open-sourcing Metals v2: Databricks' Java and Scala language server

https://www.databricks.com/blog/open-sourcing-metals-v2-databricks-java-and-scala-language-server...
2•hocuspocus•28m ago•0 comments

Zed: Delta

https://zed.dev/blog/introducing-delta
27•khy•28m ago•0 comments

I'm Done Using AI

https://brettcodes.com/im-done-using-ai/
3•GrinningFool•28m ago•1 comments

China's top AI continues using Nvidia amid high costs of local chip transition

https://www.scmp.com/tech/big-tech/article/3363491/chinas-top-ai-still-trained-nvidia-chips-what-...
1•giuliomagnifico•29m ago•0 comments