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

The Usaid Files

https://reclaimthenet.org/usaid-files
1•MassPikeMike•22s ago•0 comments

Growser: Brave browser without bloat, ads or accounts for free

https://growser.org/
1•DeepLogin•27s ago•1 comments

RL Infrastructure at Microsoft AI

https://microsoft.ai/news/rl-infrastructure-at-microsoft-ai/
1•doomroot13•1m ago•0 comments

Scaling Swarms to Agents

https://huggingface.co/spaces/HuggingFaceSwarms/scaling-swarms
1•lewtun•4m ago•0 comments

Macy's Thanksgiving Day Parade Postponed Until Saturday

https://www.nytimes.com/live/2026/11/25/nyregion/macys-thanksgiving-parade-postponed
1•jdboyd•4m ago•0 comments

Analyses: Scientists moved between the US and rest of the world

https://topcitedscientists.com/figures/us-moves-by-region/
1•kkk4seis•4m ago•0 comments

Is it time to switch to Cybersecurity?

1•s_u_d_o•6m ago•0 comments

Usaid files show Biden admin involvement with social media companies – Newsweek

https://www.newsweek.com/usaid-files-show-biden-admin-involvement-with-social-media-companies-127...
2•Anon84•11m ago•0 comments

CachyOS November 2026 Adds Easy Anti-Cheat Linux v2 Support

https://www.techtroduce.com/cachyos-november-2026-easy-anti-cheat-linux-v2/
1•debo_•11m ago•0 comments

S&P warns Nvidia's board may be compromised

https://www.reuters.com/technology/us-finds-no-evidence-china-directed-executive-spy-nvidia-ceo-w...
5•narmiouh•12m ago•1 comments

Email Sending is now available on the Workers Free plan

https://developers.cloudflare.com/changelog/post/2026-11-24-email-sending-workers-free/
1•e2e4•16m ago•0 comments

Their loss changed Appalachian forests forever.Now the American chestnut is back

https://www.theguardian.com/environment/2026/nov/24/american-chestnut-tree-restored-science-persi...
1•bookofjoe•16m ago•0 comments

Pop _OS 26.04 LTS Has Landed

https://system76.com/blog/post/pop_os-26-04-lts-has-landed
1•debo_•18m ago•0 comments

Postel Awardee Dave Täht Made Every Millisecond Count

https://www.internetsociety.org/blog/2026/11/postel-awardee-dave-taht-made-every-millisecond-count/
2•debo_•19m ago•0 comments

Jev is (probably) Qwen3.5-35B-A3B

https://modaic.dev/blog/latency-doesnt-lie
4•csoham•19m ago•0 comments

Duran Duran guitarist Andy Taylor dies aged 65

https://www.bbc.co.uk/news/articles/cmp3vk6vr44po
3•iamben•19m ago•0 comments

What VP ≠ VNP Means (In 3 Minutes)

https://www.friedgil.com/vpvnp
2•gmays•21m ago•0 comments

The ADL's Onslaught on Wikipedia to Infiltrate and Take over the Platform

https://www.mintpressnews.com/inside-the-adls-onslaught-on-wikipedia-to-infiltrate-take-over-the-...
3•unitedfirmware•24m ago•0 comments

1.5 TB of Dark Net Market Scrapes (2015)

https://gwern.net/dnm-archive
2•zenincognito•24m ago•0 comments

Coherent Energy Transformations: What elements can you make?

https://starfire.tech/shock/
1•jerlendds•25m ago•0 comments

Jensen Huang, Trump and the 11 Days That Rocked Nvidia

https://www.wsj.com/finance/stocks/jensen-huang-trump-and-the-11-days-that-rocked-nvidia-604fff0b
2•fortran77•27m ago•1 comments

SpaceX to contribute one share of its Class A common stock to every kid

https://ir.spacex.com/updates/releases-details/2026/SpaceX-to-Invest-in-the-Next-Generation-of-Am...
6•bilsbie•27m ago•3 comments

OWE-Bench: A long-horizon benchmark for measuring real-world engineering

https://arxiv.org/abs/2611.30017
1•matt_d•28m ago•0 comments

Play /Bin/Sh Invaders

https://invaders.now/
1•jrmg•31m ago•0 comments

Corporate 'orbital data centre' proposals are dangerous for humanity

https://theconversation.com/corporate-orbital-data-centre-proposals-are-dangerous-for-humanity-29...
3•cdrnsf•33m ago•0 comments

Mineillion: A daily Minecraft trivia game where rarer answers dig deeper

https://mineillion.space/
1•andre_coleman_m•33m ago•0 comments

The Near-Coup at Nvidia and the War on Open-Source AI

https://brownstone.org/articles/the-near-coup-at-nvidia-and-the-war-on-open-source-ai/
9•bushwart•35m ago•0 comments

Agent Security Shouldn't Be Compromised

https://quaspar.com/resources/agentic-ai-security
1•Banchala•40m ago•0 comments

Aldous Huxley: Knowledge and Understanding

https://vedanta.org/2002/articles/knowledge-and-understanding-part-1/
1•pmjoyce•40m ago•0 comments

The security of US water systems is even leakier than we thought

https://www.theregister.com/security/2026/11/25/the-security-of-us-water-systems-is-even-leakier-...
1•Bender•41m ago•0 comments