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

Investors warn Anthropic could struggle to sustain revenues post-IPO

https://www.ft.com/content/96d0a206-a37b-4166-b78d-b27ed24f7d57
1•1vuio0pswjnm7•1m ago•0 comments

Show HN: A browser MMO designed to be played by scripts, not people

https://space-core.at/
1•SpaceCoreDev•4m ago•0 comments

AI Journal 2: Vibe-Coding for Fun and Profit

https://devshrine.net/blog/ai-journal-2/
1•renehsz•6m ago•0 comments

Why MCP Was Always a Bad Idea

https://maharship.com/blog/why-mcp-was-always-a-bad-idea/
3•maharshi365•7m ago•0 comments

The Economics of Open-Weight Inference [pdf]

https://data.ornn.com/the-economics-of-open-weight-inference.pdf
1•adletbalzhanov•7m ago•0 comments

AI-native degree planning software for universities

https://www.coursetrees.com
1•noahfinkelstein•7m ago•1 comments

Reviving the language that brought us the Jak and Daxter Series

https://opengoal.dev/
1•birdculture•8m ago•0 comments

Exploration-Exploitation Dilemma

https://en.wikipedia.org/wiki/Exploration%E2%80%93exploitation_dilemma
1•azhenley•11m ago•0 comments

Tg-Rich-Converter: Streaming LLM Markdown and LaTeX to Telegram Bot API 10.1

https://github.com/kobaltgit/tg-rich-converter
1•kobaltGIT•11m ago•0 comments

Give, Don't Take

https://schestowitz.com/Weblog/archives/2026/09/20/give-dont-take/
1•amcclure•13m ago•0 comments

Experiments in Squatting

https://moxie.org/stories/together-two/
1•simonebrunozzi•14m ago•0 comments

The Hierarchy of Money

https://gregorygundersen.com/blog/2026/09/20/hierarchy-of-money/
2•gwgundersen•14m ago•0 comments

JEV OAS Sentinel – catch breaking API changes hidden in OpenAPI prose

https://github.com/marketplace/actions/jev-oas-sentinel
1•bookcool•15m ago•0 comments

Slapp Censorship – Pt. 190/200: Plagiarism, Back Doors, and Sabotage of Linux

https://techrights.org/n/2026/09/20/SLAPP_Censorship_Part_190_Out_of_200_Plagiarism_Back_Doors_an...
2•amcclure•15m ago•0 comments

GNU/Linux Has Grown a Lot Lately

https://techrights.org/n/2026/09/20/GNU_Linux_Has_Grown_a_Lot_Lately.shtml
1•amcclure•16m ago•0 comments

Safety Warning: Carborane Mixtures

https://www.science.org/content/blog-post/safety-warning-carborane-mixtures
1•EA-3167•19m ago•0 comments

The Problem Is Prompt Debt

https://www.dbreunig.com/2026/06/22/the-problem-is-prompt-debt.html
1•raphaelcosta•20m ago•0 comments

How workers are unlocking new ways of working

https://openai.com/index/unlocking-new-ways-of-working/
2•rdslw•21m ago•0 comments

Tensorbrife

https://www.tensorbrife.site/
2•tjjune•21m ago•1 comments

Show HN: Emetgate – a verification gate between an LLM and your source tree

https://github.com/emetgate/emetgate
2•ugurcl•22m ago•0 comments

How to Be Sovereign

1•At1C•29m ago•0 comments

Post-Quantum OpenID Connect

https://openid.net/post-quantum-openid-connect/
1•EthanHeilman•30m ago•0 comments

Geatsc – TypeScript-to-C++ Compiler

https://github.com/geastack/compiler
1•arbayi•31m ago•0 comments

One model writes the code, a different model reviews it

https://github.com/WDahah/portable-dsh-multi-agent-plugin
1•WDahah•33m ago•0 comments

Show HN: SubCrisp, a free subscription tracker that shows what cancelling saves

https://subcrisp.com/
1•dablity•34m ago•0 comments

What Is It Like to Be a Cat Tail? (2021)

https://gwern.net/blog/2021/cat-tail
1•1317•35m ago•0 comments

Planetary Boundaries Laser Talk Booklet

https://docs.google.com/document/d/1K7O1Aq2EXhZ2AJhJunAwuZ8B41nZFfGufFRJDe92jdA/edit?tab=t.0
1•debo_•37m ago•1 comments

Claude skill and Obsidian plugin to proofread your English writing

https://codomaniac.com/claude-skill-and-obsidian-plugin-to-proofread-your-english-writing/
1•piorus•38m ago•0 comments

Show HN: NiceTryGPT and CTF and riduzione degli shortcut LLM

https://github.com/aleff-github/NiceTryGPT
2•aleff•40m ago•0 comments

NodeX – Serverless P2P E2EE Messenger in Rus

https://github.com/NetGadz/NodeX
1•gadz•40m ago•0 comments