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

Compendium – Shared workspace for teams and AI agents

https://www.cerenovus.ai/
1•Azimuth05•2m ago•0 comments

The AI Policy That Never Shipped

https://mendelevium.github.io/the-policy-never-shipped/
1•bobbybidon•3m ago•0 comments

Global Cancer Observatory – interactive visualization and data explore

1•andsoitis•6m ago•0 comments

EU's border check needs complete 'overhaul', says Greek airports chief

https://www.ft.com/content/83ae0ca8-ccce-4253-abfb-4c204f24bbbd
1•JumpCrisscross•7m ago•0 comments

FarRail Tours

https://www.farrail.com/
1•Svip•8m ago•0 comments

I am Scott Hansen, I make music as Tycho and visual work as ISO50 (2013)

1•andsoitis•14m ago•0 comments

China's Comicup convention showcases 'nüwu,' a niche genre avoiding romance

https://www.sixthtone.com/news/1018736/NoWoo:AtChina’sTopAnimeConvention,LoveTakesaBackSeat
1•whiteblossom•14m ago•0 comments

GPT‑Live

https://openai.com/index/introducing-gpt-live/#
1•adithyaharish•21m ago•0 comments

Modernizing Kernel Cryptography [video]

https://www.youtube.com/watch?v=TBUK5DKeXRg
1•zdkaster•30m ago•1 comments

Meta Tapped a Pentagon Supplier to Prototype Face Recognition for Its Glasses

https://www.wired.com/story/meta-rank-one-computing-face-recognition-smart-glasses/
2•1vuio0pswjnm7•33m ago•0 comments

Feds demand autonomous vehicle companies stop interfering with first responders

https://techcrunch.com/2026/07/08/feds-demand-autonomous-vehicle-companies-stop-interfering-with-...
2•rilan•39m ago•0 comments

Neuromorphic Silicon Neuron Controller for Deep Brain Stimulation in Parkinsons

https://arxiv.org/abs/2607.05453
1•Jimmc414•42m ago•0 comments

I fact-checked 15 stats from a 1.2M-subscriber creator against primary sources

https://hemantpatil.substack.com/p/i-fact-checked-15-stats-from-a-12m
1•HPatil7•47m ago•2 comments

How to Kill the Bloat in Claude Code's System Prompt

https://www.aihero.dev/how-to-kill-the-bloat-in-claude-codes-system-prompt
2•Garbage•49m ago•0 comments

How to come up with a passion project

https://greatlittle.software/blog/how-to-come-up-with-a-passion-project/
2•Garbage•49m ago•0 comments

Invisible Companies: Why Overlooked Businesses Win

https://colossus.com/article/invisible-companies/
1•Garbage•51m ago•0 comments

Reproducing an Indirect Prompt Injection Against a RAG Pipeline

https://koreshield.ai/blog/reproducing-indirect-prompt-injection-rag
1•uncleteslim•52m ago•0 comments

Benchmarking quantum advantage: Quantum Advantage Tracker

https://quantum-advantage-tracker.github.io/
1•Alien1Being•53m ago•1 comments

'Humanizer' tool can erase signs of AI-written text

https://www.nature.com/articles/d41586-026-02105-3
2•gnabgib•58m ago•0 comments

I Built the Ωmega Agent

https://omegas.dev
2•LivingGlitcher•58m ago•2 comments

NPM 12 makes install scripts, Git, and remote-url dependencies opt-in by default

https://github.blog/changelog/2026-07-08-npm-install-time-security-and-gat-bypass2fa-deprecation/
2•slymax•1h ago•0 comments

Cancer cases worldwide are expected to soar in the coming decades

https://www.washingtonpost.com/health/2026/07/08/why-who-is-warning-about-escalating-cancer-rates...
5•brandonb•1h ago•2 comments

Waymo Calls Police on Teenage Riders Who Were Drinking

https://www.roadandtrack.com/news/a71866405/waymo-robotaxi-calls-police-on-teenage-passengers-dri...
3•kerim-ca•1h ago•1 comments

Top Legal Adviser to Joint Chiefs Is Stepping Down a Year Before Completing Term

https://www.propublica.org/article/eric-widmar-retiring-joint-chiefs-legal-adviser
8•Jimmc414•1h ago•0 comments

Practical Lessons from Reinforcement Learning Post Training Experiments [pdf]

https://zenodo.org/records/21115798
2•luvverma2011•1h ago•0 comments

China Cuts 12,200 University Programs, Replaces Many with AI Degrees

https://www.forbes.com/sites/annaesakismith/2026/06/23/china-cuts-12200-university-programs-repla...
4•happy-go-lucky•1h ago•0 comments

non-tech founder + choosing between buying ClaudeCode or CodeX

2•virtuallymundo•1h ago•2 comments

Texans deserve more then a Ken Paxton snake game

https://paxtonsnake.3d2k.com/
2•KilledByAPixel•1h ago•1 comments

Show HN: Figment – An AI that I made my friends talk to for 2 weeks

https://figment.computer/
2•subby•1h ago•0 comments

Burner Email, Temp email Box lasting 24 hours

https://burneremail24.com/
3•texasjosh•1h ago•1 comments