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

ShotPlan: Cinematic Video Generation with Learnable Planning Token

https://pensioner-11.github.io/ShotPlan/
1•ilreb•3m ago•0 comments

Reasons for having your own website in 2026

https://bellkiosk.website/blog/reasons-to-website.html
2•vinhnx•3m ago•0 comments

Show HN: UEFI Bootloader for TempleOS

https://codeberg.org/0x2f22d23e/UwUEFI
1•AlecMurphy•5m ago•0 comments

Laura Grego on satellites, nuclear weapons and the battle for our skies

https://www.theguardian.com/lifeandstyle/2026/jul/20/doomsday-system-physicist-laura-grego-satell...
2•oriettaxx•8m ago•0 comments

AI's solution to 87-year-old riddle takes mathematicians by surprise

https://www.newscientist.com/article/2580374-ais-solution-to-87-year-old-riddle-takes-mathematici...
1•vismit2000•8m ago•0 comments

What Becomes Scarce After Intelligence?

https://manasbihani.substack.com/p/every-ai-bet-is-the-same-bet
1•manasb25•10m ago•0 comments

Perverse Polymorphism

https://www.science.org/content/blog-post/perverse-polymorphism
1•bryanrasmussen•11m ago•0 comments

Eliminating Conda/CUDA dependency hell in computational biology pipelines

https://github.com/evo-design/proto-tools
1•LionTurtle13•14m ago•0 comments

Paper Soccer

https://paper.soccer/
3•soupspaces•18m ago•1 comments

Show HN: Vertically Works – UI components built on writing-mode: vertical-RL

https://vertically.works
1•jihoons•18m ago•0 comments

Show HN: DroneWorld – Earth with multiplayer drones and Ethereum real estate

https://droneworld.app/
1•mannders•22m ago•0 comments

Elite Young Runners Are Becoming Freakishly Fast. Welcome to 'Trackflation'

https://www.wired.com/story/teenagers-running-trackflation/
1•gammarator•22m ago•0 comments

Show HN: Repolink – Turn any GitHub repo into a tool for any of your projects

https://github.com/imjszhang/js-repolink
1•imjszhang•26m ago•0 comments

X (Formerly Twitter) Is Going Open Source

https://twitter.com/elonmusk/status/2077361679034118271
2•LopRabbit•27m ago•0 comments

Bash for Browser Front End

https://alganet.github.io/terminal/?p=post:2026-07-21-00-Bash-for-Browser-Frontend&lang=en
1•gaigalas•29m ago•0 comments

Show HN: Fluidic Network Grid – A branchless control plane in Jax

https://github.com/PJHkorea/Fluidic_Network_Grid
1•PJHkorea•33m ago•1 comments

Show HN: Imud – Gpsd, but for IMUs

https://github.com/richcreations/imud
1•richcreations•37m ago•0 comments

Covid-19 Misinformation

https://en.wikipedia.org/wiki/COVID-19_misinformation
3•num42•42m ago•1 comments

Foldkit

https://foldkit.dev/
3•handfuloflight•42m ago•0 comments

Video-use: Edit videos with coding agents

https://github.com/browser-use/video-use
3•nateb2022•44m ago•0 comments

Five US tech giants' hidden debts soar to $1.65T on opaque AI funding

https://asia.nikkei.com/business/technology/five-us-tech-giants-hidden-debts-soar-to-1.65tn-on-op...
48•NordStreamYacht•45m ago•1 comments

Salami Slicing Tactics

https://en.wikipedia.org/wiki/Salami_slicing_tactics
3•num42•45m ago•0 comments

Running Doom on Our Custom CPU and Going Viral

https://www.armaangomes.com/blogs/doom/
12•arghunter•47m ago•0 comments

A Koi Pond Mosaic Made from 10 Pounds of 3D Printer Waste

https://www.instructables.com/A-Koi-Pond-Mosaic-Made-From-10-Pounds-of-3D-Printe/
15•sudo_cowsay•49m ago•1 comments

Jane Street: Incremental

https://github.com/janestreet/incremental
13•handfuloflight•50m ago•1 comments

Windows Performance Exploitation

https://lagtency.com/2026/06/25/win-perf/
2•proxylatte•51m ago•0 comments

VTubing: How a Japanese Phenomenon Is Going Worldwide

https://www.tokyodev.com/articles/vtubing-how-a-japanese-phenomenon-is-going-worldwide
3•pwim•58m ago•0 comments

Emoticons

https://en.wikipedia.org/wiki/List_of_emoticons
3•audreyfei•1h ago•0 comments

How did I publish a paper in ACMKDD as an undergraduate

https://medium.com/@JarrettYe/how-did-i-publish-a-paper-in-acmkdd-as-an-undergraduate-c0199baddf31
2•ktimespi•1h ago•1 comments

Writers need new strategies to stand up to AI

https://www.thedial.world/articles/news/copyright-law-ai-intellectual-property
6•colinprince•1h ago•0 comments