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

Winning the Categories Game with Min-Cost Flow

https://benmandrew.com/articles/winning-the-categories-game-with-min-cost-flow
1•benmandrew•4s ago•0 comments

Datacenters, Elon Musk, and AI are all on chopping block once Congress changes

https://www.theregister.com/legal/2026/11/09/datacenters-elon-musk-and-ai-are-all-on-the-chopping...
1•Bender•40s ago•0 comments

Sumerian Language

https://etcsl.orinst.ox.ac.uk/edition2/language.php
1•Bluestein•45s ago•0 comments

AI Slop FM radio experiment puts machines on trial, one dodgy tune at a time

https://www.theregister.com/offbeat/2026/11/09/ai-slop-fm-radio-experiment-puts-machines-on-trial...
1•Bender•1m ago•0 comments

Private LLM copies can agree on a secret key over a public channel

https://matthewritch.com/blog/2026/11/08/LLM-Preferences-Private-Keys-Fingerprinting/
1•mdritch•1m ago•0 comments

Linus Torvalds sees signs AI-prompted patch flood has peaked

https://www.theregister.com/security/2026/11/09/linus-torvalds-sees-signs-ai-prompted-patch-flood...
1•Bender•1m ago•0 comments

Humans will never again create a project like Wikipedia

https://www.economist.com/culture/2026/10/29/humans-will-never-again-create-a-project-quite-like-...
1•edward•2m ago•0 comments

Advent of Code 2026

https://adventofcode.com/2026
1•vismit2000•3m ago•0 comments

Show HN: Sortaballs v2 – logical game with 10 modes and over 1000 puzzles

https://sortaballs.vercel.app
1•self_refactor•3m ago•0 comments

Rakuten AST to begin direct-to-cell experiments by end of year

https://global.rakuten.com/corp/news/press/2026/1109_01.html
1•numpad0•6m ago•0 comments

Consider the Agent: Pity, persuasion and selection in an emerging AI ecology

https://institute.deepmind.com/essays/consider-the-agent/
2•gHeadphone•7m ago•0 comments

Ernie Evolve: automated research system for improving AI training and inference

https://ernie.baidu.com/research/posts/ernie-evolve/
1•pretext•8m ago•0 comments

Show HN: I run 19 production APIs on a free-tier VPS

https://github.com/hhellll/dev-utility-APIs
1•hhelll•10m ago•0 comments

Nvidia's China Problem [pdf]

https://culperresearch.com/wp-content/uploads/2026/05/Culper_NVDA_5-13-2026.pdf
3•Erikun•12m ago•0 comments

We built for humans first – Agents felt right at home

https://mycorr.app/blog/built-for-humans-first/
1•maxschub•12m ago•0 comments

Show HN: Nörth – a simple app for humane collaboration

https://north.social/
1•josh_nies•13m ago•0 comments

Fold Epic Paper Airplanes

https://www.foldableflight.com
18•vismit2000•13m ago•1 comments

Show HN: Harness Resource Bench – CPU, memory and disk of coding agents

https://leonardcser.github.io/harness-resource-bench
2•leonardcser•14m ago•0 comments

Show HN: Slopie, Spotify wrapped for your Claude Code and Codex history

1•themegh•14m ago•0 comments

Show HN: Index of Mentour Pilot Videos since 2020

https://mentour-index.pages.dev/
1•leumon•17m ago•0 comments

Show HN: HackerTube – Videos Recommended by Hacker News

https://hackertubes.com
1•dotcurio•18m ago•0 comments

How SkyPilot on Slurm and Kubernetes put 1k idle GPU hours a week to work

https://www.photoroom.com/inside-photoroom/using-idle-gpus-with-skypilot
1•davidPHR•21m ago•0 comments

When PGD fails, is your model safe? I tested it vs. Marabou SMT on traffic signs

https://github.com/giovanni-norbedo/gtsrb-formal-verification
1•luka373•22m ago•0 comments

AI Shodo Arena

https://aishodo.enpitsu.org/works/shinra-bansho--deepseek-v4-1-flash?lang=en
1•numpad0•22m ago•1 comments

Fighting A.I. Cheating on the SAT Is a Cat-and-Mouse Game

https://www.nytimes.com/2026/11/06/us/college-board-cheating-sat.html
1•cainxinth•25m ago•0 comments

Roman Empire built from $70k of Lego bricks [video]

https://www.youtube.com/watch?v=VyNzkriHh-U
1•phartenfeller•27m ago•1 comments

Automate Documentation Screenshots with .NET

https://www.jerriepelser.com/posts/automate-documentation-screenshots/
2•jerriep•29m ago•0 comments

Why the Belgian King Is Not the King of Belgium

https://signoregalilei.com/2026/10/18/why-the-belgian-king-is-not-the-king-of-belgium/
1•surprisetalk•32m ago•0 comments

19 years old college student wins court election to one of the largest county

https://www.nytimes.com/2026/11/07/us/politics/asu-student-maricopa-county-clerk-election.html
1•frenchmajesty•33m ago•1 comments

Covert Russian network exploited French riots on social media, EU report says

https://www.reuters.com/world/europe/covert-russian-network-exploited-french-riots-social-media-e...
3•bhouston•34m ago•0 comments