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

Plato's Key

https://hazyresearch.stanford.edu/blog/2026-11-25-platos-key
1•tomrod•1m ago•0 comments

NSF – Accelerated Bachelor's to PhD (AccelPhD)

https://www.nsf.gov/funding/opportunities/accelphd-accelerated-bachelors-phd
2•aanet•1m ago•1 comments

Effective Altruism Is Too Tied to the AI Industry to Stop It

https://ai-frontiers.org/articles/effective-altruism-is-too-tied-to-the-ai-industry-to-stop-it
1•bagacrap•5m ago•0 comments

Show HN: Bebox – back end in a box, inside a single process

https://bebox.run
2•j4w8n•5m ago•0 comments

Dyson's $500 Leaking CameraJet Toothbrush Is Back, and We Now Know Why It Failed

https://www.wired.com/story/dyson-leaking-camerajet-toothbrush-is-back-and-we-now-know-why-it-fai...
1•bookofjoe•13m ago•1 comments

The After Math

https://peppaking8.github.io/the-after-math/
1•markus_zhang•13m ago•0 comments

Gaia unveils two-billion-star map of our galaxy and beyond

https://www.esa.int/articles/about-us/directorates/science/gaia/gaia-unveils-two-billion-star-map...
1•rexbee•17m ago•0 comments

In a Streaming World, Should You Stand Still

https://dl.acm.org/doi/abs/10.1145/3770855.3817495
1•teleforce•21m ago•0 comments

First Portion of NASA Hybrid Jet Engine Project Yields Successes

https://www.nasa.gov/general/first-portion-nasa-hybrid-jet-engine-project/
2•gmays•21m ago•0 comments

How to properly measure local LLM speed

https://blog.thepixelary.com/post/835211620290609152/how-to-properly-measure-llm-speed-finale
1•mikepan•24m ago•1 comments

Six Experts on Reclaiming AI for the Public Good

https://thereader.mitpress.mit.edu/six-experts-on-reclaiming-ai-for-the-public-good/
3•aanet•27m ago•0 comments

Open Music Theory

https://viva.pressbooks.pub/openmusictheory/
7•gregsadetsky•28m ago•0 comments

Show HN: Hexplained.dev – What's in This File?

https://hexplained.dev/
1•suresk•31m ago•0 comments

FreeBSD 15.2 Release Delayed Due to AI-Driven Security Advisories

https://www.phoronix.com/news/FreeBSD-15.2-RC2
2•mikece•35m ago•1 comments

GL.iNet admits using reverse shells on routers during breach response

https://www.bleepingcomputer.com/news/security/glinet-admits-using-reverse-shells-on-routers-duri...
4•colinprince•37m ago•0 comments

Behold the first footage of an anglerfish sucking prey into its toothed maw

https://www.cbc.ca/lite/story/9.7447059
2•colinprince•41m ago•0 comments

Show HN: Build a Research Empire Game

https://pubper.frontpageintelligence.ai/
1•dougSF70•43m ago•0 comments

The most elegant key change in all of pop music (2021) [video]

https://www.youtube.com/watch?v=epqYft12nV4
2•gregsadetsky•46m ago•0 comments

China proposes rules to stop people falling in love with humanoid robots

https://www.independent.co.uk/asia/china/china-rules-people-love-humanoid-robots-b3096103.html
1•Alien1Being•49m ago•1 comments

Ubuntu spent years patching GNOME, but things it can't fix are the real problem

https://www.xda-developers.com/ubuntu-has-been-patching-gnomes-missing-basics-since-2017-and-gnom...
1•cromka•52m ago•0 comments

Visualize: Agent Skill that turns a one-line request into a step-through visual

https://github.com/Aaryan1524/Visualize
1•thunderbong•56m ago•0 comments

A Gift Guide for Everyone, No One, and Karen, Who Has Dementia

https://longreads.com/2026/12/03/christmas-holiday-gift-guide-dementia/
1•gmays•57m ago•0 comments

Centralized AI Games, Centralized AI Prizes

https://www.pond.is/p/centralized-ai-games-centralized
2•StevenVincent•1h ago•0 comments

The 4D SU(N) Yang–Mills Mass Gap in Lean4

https://umpolungfish.github.io/yang-mills-lean4/
1•umpolungfish•1h ago•0 comments

Meltwater Pulse 1A

https://en.wikipedia.org/wiki/Meltwater_pulse_1A
3•PeterHolzwarth•1h ago•2 comments

Air France Crew Told to Track Passengers Who Didn't Eat or Drink

https://onemileatatime.com/news/air-france-crew-told-secretly-track-passengers-didnt-eat-drink/
8•malshe•1h ago•3 comments

SwarmHarm: Sandbox for emergent multi-agent swarm behaviors

https://swarmharm.com/
1•dagli•1h ago•0 comments

Deep learning for kidney cancer screening using non-contrast computed tomography

https://www.nature.com/articles/s44360-026-00223-w
6•marc__1•1h ago•0 comments

Production Companies, Literary Agents, Foreign Languages: AI-Driven Scams

https://writerbeware.blog/2026/08/28/production-companies-literary-agents-foreign-languages-ai-dr...
1•Alien1Being•1h ago•0 comments

The No AI Webring

https://baccyflap.com/noai/
1•pocksuppet•1h ago•0 comments