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

Earth Mover's Distance

https://en.wikipedia.org/wiki/Earth_mover%27s_distance
1•ariru•33s ago•0 comments

AI Does Not Change Goodhart or the Folly of Tokenmaxxing

https://www.scrum.org/resources/blog/folly-tokenmaxxing-or-reinventing-wheel
1•swolpers•36s ago•0 comments

Rewriting a production compiler's IR with AI agents in five weeks

https://github.com/CommanderTvis/writing/tree/main/rr-truffle-rewrite
1•CommanderTvis•4m ago•0 comments

A $21B 'Kids in Chips' Startup Is Scooping Up Nvidia Talent

https://www.wsj.com/tech/ai/a-21-billion-kids-in-chips-startup-is-scooping-up-nvidia-talent-4d099f12
1•_tk_•5m ago•0 comments

Prompt Injection in VirusTotal's Code Insights API

https://exploiting.systems/posts/2026-08-08-prompt-injection-in-virustotals-code-insights-api
1•ropbear•9m ago•0 comments

Conlang

https://en.wikipedia.org/wiki/Constructed_language
1•svenfaw•10m ago•0 comments

As Wisconsin cities flee Flock, its shared camera network loses value

https://arstechnica.com/tech-policy/2026/08/as-wisconsin-cities-flee-flock-its-shared-camera-netw...
7•xoa•12m ago•1 comments

KDE's bookmark search ignores Brave because of one unmatched string

https://balint.blog/krunner-brave/
1•balintkorosi•12m ago•0 comments

Constantine's Bridge Has Surfaced from Beneath the Danube

https://thedebrief.org/a-mile-long-ancient-roman-engineering-marvel-has-suddenly-surfaced-from-be...
1•bookofjoe•14m ago•1 comments

Democracy vs. the machine: birth of digital age,the warnings that were ignored

https://www.theguardian.com/news/2026/aug/18/the-long-read-democracy-v-the-machine-digital-age-wa...
3•pseudolus•15m ago•0 comments

Searching for Answers from the Man Accused of Sabotaging Alaska's Senate Race

https://www.nytimes.com/2026/08/18/us/politics/dan-sullivan-alaska-senate-primary.html
1•dataflow•18m ago•0 comments

Wound/wait deadlock-proof mutex design

https://www.kernel.org/doc/html/latest/locking/ww-mutex-design.html
1•teleforce•19m ago•0 comments

Suicide hotlines don't seem to help

https://www.nber.org/papers/w35601
2•root-parent•24m ago•2 comments

US LLCs for founders whose country Stripe/Shopify don't support

https://open-entity.com
1•Doccc•25m ago•0 comments

Who bears the risk in Nvidia's $500B financing platform?

https://www.sascha-steffen.de/updates/nvidia-500bn-ai-financing-credit-risk
2•root-parent•27m ago•0 comments

AI Used to Verify Toughest Mathematics Proof Yet

https://spectrum.ieee.org/axiom-math-246-theorem-formalization
1•pseudolus•28m ago•0 comments

Show HN: Kitsunagu – A platform to find English-speaking professionals in Japan

https://kitsunagu.com/
2•byra•30m ago•1 comments

The most complex time in 20 years to build an enterprise software startup

https://eportnoy.substack.com/p/the-chaotic-enterprise-startup-period
1•eliportnoy•32m ago•0 comments

The hyperscalers' exploding 'purchase commitments' reach $1.5T

https://www.ft.com/content/1fbe47a6-bbf1-4de1-973b-8ce5baea591d
2•root-parent•33m ago•2 comments

Fredkin's Paradox

https://en.wikipedia.org/wiki/Fredkin%27s_paradox
1•throw0101a•35m ago•0 comments

Handover of In-Context Learning State Across Session Boundaries

https://arxiv.org/abs/2608.14528
1•ninadwrites•36m ago•0 comments

We still don't know how people are using AI

https://www.technologyreview.com/2026/08/18/1142226/how-people-use-ai/
4•joozio•37m ago•0 comments

Daron Acemoğlu: We Are "At the Cusp of Losing" Liberal Democracy [video]

https://www.youtube.com/watch?v=rvOfGzNn3-0
4•mertbio•38m ago•0 comments

Show HN: AirStats – Mac menu bar system monitor, 0.046% CPU idle, MIT

https://github.com/byrencheema/airstats
2•byrencodes•39m ago•0 comments

The Case for Deep Conversation in a World of Small Talk

https://thewalrus.ca/small-talk/
1•pseudolus•41m ago•0 comments

Data driven essay: Misogyny kills; misandry kills at scale

https://socialsommentary.substack.com/p/misogyny-kills-misandry-hurts-feelings
1•dandare•41m ago•0 comments

ARM64 BBML3 Feature Ready with Linux 7.3, Nvidia Olympus Workarounds

https://www.phoronix.com/news/ARM64-Linux-7.3
2•rbanffy•41m ago•0 comments

Show HN: ImageSage – Find the screenshot you want from 10k messy screenshots

https://apps.microsoft.com/detail/9mt89hd9s6sm?hl=en-US&gl=US
1•ringlochid•47m ago•0 comments

Bootstrappable Builds: How and Why

https://lwn.net/SubscriberLink/1088279/ada6cd53d01cdafa/
1•6581•51m ago•0 comments

Security Through Obscurity

https://en.wikipedia.org/wiki/Security_through_obscurity
2•thuva4•54m ago•0 comments