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

I Let Google's Personal Intelligence Access My Life–and It's a Help

https://www.wsj.com/tech/ai/google-personal-intelligence-dreambeans-gemini-review-81f12a16
1•doener•3m ago•0 comments

Ask AI buttons like social media links for webpages

https://llmcheck.app/ai-ask-buttons/
1•loudsilence•3m ago•0 comments

Yap: A Particular Kind of Slop

https://mckayla.blog/posts/yap.html
1•eric_h•4m ago•0 comments

StateUI

https://github.com/idexus/StateUI
1•frizlab•5m ago•0 comments

FOSDEM 2026 – Mainline kernel for Fairphones – 2026 update [video]

https://www.youtube.com/watch?v=UnvKm3mzasI
1•pizzaiolo•5m ago•0 comments

Godot Sandbox: The Answer is 42

https://libriscv.no/blog/godot-sandbox-fortytwo/
1•fwsgonzo•8m ago•0 comments

Rig – Agentic Workflows in Rust

https://github.com/0xplaygrounds/rig
3•monneyboi•11m ago•0 comments

Cancer is a Quantum System

https://www.cuimc.columbia.edu/news/cancer-quantum
1•alephnerd•12m ago•0 comments

Show HN: The impact that made the Moon, 262k particles in a browser tab

https://gaploid.github.io/cosmic-collisions/
1•gaploid•12m ago•0 comments

7th Circuit Rules AI-Generated CSAM Is Protected Speach

https://media.ca7.uscourts.gov/cgi-bin/OpinionsWeb/processWebInputExternal.pl?Submit=Display&Path...
2•piker•15m ago•0 comments

For better or worse, Yayoi Kusama's Infinity Rooms reshaped the world

https://www.cnn.com/2026/08/28/style/yayoi-kusama-infinity-mirrors-art-impact
1•reconnecting•15m ago•1 comments

Give Coding Agents Permission, Not Just Prompts

https://engineeringspec.org/blog/give-coding-agents-permission-not-just-prompts/
1•mak8•19m ago•0 comments

One 'absolutely prolific' male bird is keeping his species alive in the U.K

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

Building an LLM runtime in 700 lines of C

https://github.com/ryanssenn/gemma4.c
3•ryansen•22m ago•1 comments

We made a new robot – Microduck [video]

https://www.youtube.com/watch?v=RAtzEyGBGFU
2•arbayi•23m ago•0 comments

E.V. Sales Are Rising After the Gulf Oil Shock. Here's Where.

https://www.nytimes.com/interactive/2026/08/18/climate/ev-car-sales-oil-prices.html
1•bookofjoe•23m ago•1 comments

Study links listening to live metal improves tolerance for pain, cold

https://gizmodo.com/study-links-listening-to-live-metal-with-an-improved-tolerance-for-pain-cold-...
2•HieronymusBosch•30m ago•1 comments

Stamping build info in constant memory

https://fzakaria.com/2026/08/25/stamping-build-info-in-constant-memory
1•ingve•32m ago•0 comments

My answer to AI burnout: more AI (but context is king)

https://sycdan.wordpress.com/2026/08/29/my-answer-to-ai-burnout-more-ai-but-context-is-king/
1•sycdan•34m ago•0 comments

Being kicked out of the tech industry

https://www.jacky.wtf/essays/2026/kicked-out/
3•birdculture•34m ago•1 comments

Rational quantum mechanics: Testing quantum theory with quantum computers

https://www.pnas.org/doi/10.1073/pnas.2523350123
2•dustingetz•35m ago•0 comments

Show HN: VT Code – a terminal coding agent with a human-reviewed WebMCP editor

https://vinhnx.github.io/VTCode/
1•vinhnx•37m ago•0 comments

Satellite images reveal scale of flood devastation in Nepal villages

https://www.bbc.com/news/articles/cd68vpjv21do
1•blondie9x•41m ago•0 comments

LoRA Primer

https://tinker-docs.thinkingmachines.ai/tinker/lora-primer/
1•tosh•42m ago•0 comments

Tech backlash reaches fever pitch as AI angst collides with social media fears

https://www.cnbc.com/2026/08/29/tech-backlash-ai-data-centers-elections.html
2•1vuio0pswjnm7•48m ago•0 comments

Meta's Newspaper Ad Blitz Ups Pressure on Social Media Rivals

https://www.bloomberg.com/news/articles/2026-08-28/meta-s-newspaper-ad-blitz-ups-pressure-on-soci...
1•1vuio0pswjnm7•50m ago•0 comments

Death, Dying, and the Memorialization of the Dead

https://macleki.org/stories/death-dying-and-the-memorialization-of-the-dead/
1•thunderbong•50m ago•0 comments

Show HN: Pico-Faces – A diffusion transformer image generator on a RP Pico 2 MCU

https://github.com/cpldcpu/pico-faces
4•cpldcpu•51m ago•0 comments

What It Took to Dismantle the Most Powerful Company in the World (NYT)

https://www.nytimes.com/2026/08/28/opinion/ai-power-lobbying-military-britain-east-india-company....
3•scrollop•57m ago•1 comments

Have an Agent Babysit Your Deployments

https://blog.exe.dev/athena-deploys-exe
1•gk1•1h ago•0 comments