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

Spirit Room – Test whether agents can find and use your MCP tools

https://spiritroom.app/
1•LeonidBugaev•1m ago•0 comments

Claude Code, Codex and OpenCode Find MCP Tools

https://spiritroom.app/blog/optimise-mcp-tools-for-agents/
1•LeonidBugaev•1m ago•0 comments

The Download: preserving the Arctic permafrost, and playful AI agents

https://www.technologyreview.com/2026/10/19/1147103/the-download-preserving-the-arctic-permafrost...
1•joozio•2m ago•0 comments

Why TypeScript lets you overrule its type checker

https://www.ultracite.ai/research/type-escape-hatches
1•fmerian•4m ago•0 comments

Python's binary wheels and supply chain attacks

https://rushter.com/blog/python-binary-wheels/
1•theanonymousone•5m ago•0 comments

How tough can emoji be?

https://totaldraw.com/blog/emoji/
1•theanonymousone•7m ago•0 comments

Show HN: Earshot – talk to Claude Code with AirPods, nod to send

https://github.com/epavanello/earshot
1•ema_dev•10m ago•0 comments

Show HN: Daymark – private iPhone habit tracker ($14.99 once)

https://daymark.one/
1•sophietaylor•12m ago•0 comments

Curl proposes "Every vulnerability report < HIGH is immediately made public"

https://github.com/curl/curl/discussions/23458
1•awkwardpotato•13m ago•1 comments

Latchkey CI: Keep Running CI Even When GitHub Is Down (Which It Is)

https://latchkey.dev/
1•hevaka•14m ago•0 comments

Zombie Copyright: It's déjà vu all over again

https://lessig.medium.com/zombie-copyright-its-d%C3%A9j%C3%A0-vu-all-over-again-bb9677196081
1•Tomte•14m ago•0 comments

Nathan Fielder Tells Us Everything

https://www.wired.com/story/nathan-fielder-tells-us-everything/
1•shortlived•15m ago•0 comments

How Grok Bot Works

https://www.peterp.me/articles/what-actually-happens-when-you-message-grok-bot/
2•thegreatpeter•15m ago•0 comments

Show HN: An outliner to replace Workflowy and Obsidian – as a Claude connector

https://claude.ai/directory/bulletlist
1•laurentenhoor•15m ago•0 comments

New Rules Push Power Grids Toward Domestic Inverters

https://spectrum.ieee.org/power-grid-security-china-inverters
1•rbanffy•15m ago•0 comments

JAMA AI

https://jamanetwork.com/channels/introducing-jama-ai
1•brandonb•17m ago•0 comments

Android apps running native on macOS

https://github.com/kksimp/Mac.apk
2•flocked•18m ago•0 comments

Netflix Eliminates About 1k Jobs in Biggest Cuts Since 2022

https://www.wsj.com/business/media/netflix-eliminates-about-6-of-staff-in-biggest-cuts-since-2022...
3•haunter•19m ago•0 comments

Chinese export boom has legs – and wings

https://www.reuters.com/world/china/this-chinese-export-boom-really-has-legs-wings-2026-10-15/
3•usernomdeguerre•20m ago•1 comments

The Seventeen Provers of the World [pdf]

https://www.cs.ru.nl/~freek/comparison/comparison.pdf
1•mindcrime•20m ago•0 comments

Software is eating the world; AI is eating software – so what's next?

https://medium.com/@theopriestley/software-is-eating-the-world-ai-is-eating-software-so-whats-nex...
2•judgementday•22m ago•0 comments

A team of Gemini 4 Argon agents beats Minecraft

https://arxiv.org/abs/2610.22319
2•DeepLogin•23m ago•0 comments

A train simulator game for console hackers

https://github.com/antoniovazquezaraujo/LeTrain
1•avaraujo•24m ago•0 comments

Ex-OpenAI worker accused of planting device had Saudi support

https://www.bbc.co.uk/news/articles/c6gel2dlyxvyo
3•4ndrewl•25m ago•0 comments

I no longer care to work on any Ruby gems so I've archived all my repositories

https://po-ru.com/2026/10/18/why-im-no-longer-updating-this-repository
107•phoronixrly•27m ago•42 comments

Failfs

https://docs.kernel.org/next/filesystems/failfs.html
3•PaulHoule•29m ago•1 comments

Backpropagation step by step: the forward and backward pass

https://fremaconsulting.ch/blog/backpropagation
2•tohms•29m ago•1 comments

ARP Tell your network to explain itself

https://benjcal.space/blog/arp-tell-your-network-to-explain-itself/
1•birdculture•29m ago•0 comments

Paradise Lost, Diffed

https://quuxplusone.github.io/blog/2026/10/17/paradise-lost-diffed/
1•ibobev•29m ago•0 comments

Composite objects and C++26 the std:polymorphic type

https://mariusbancila.ro/blog/2026/10/18/composite-objects-and-cpp26-the-stdpolymorphic-type/
1•ibobev•30m ago•0 comments