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

SpaceX is planning to launch $19B of chips into space every year

https://techcrunch.com/2026/12/01/spacex-is-planning-to-launch-19-billion-of-chips-into-space-eve...
1•rominl•44s ago•0 comments

Microsoft veteran reminds devs that version control won't number their releases

https://www.theregister.com/offbeat/2026/12/02/microsoft-veteran-reminds-devs-that-version-contro...
1•speckx•2m ago•0 comments

EU strikes deal to cut red tape for small packaging producers

https://www.consilium.europa.eu/en/press/press-releases/2026/12/01/simplification-council-and-par...
2•layer8•3m ago•0 comments

Show HN: TinyRealm, a 45M-parameter world model that runs in the browser

https://udgamlabs.com/models/tinyrealm
1•jiteshkprasad•4m ago•1 comments

Licensr, payments and license keys on your own Stripe/PayPal account

https://licensr.app/
1•charline_pom•6m ago•0 comments

Electric cars outsold petrol cars in the EU for a FULL YEAR

https://bsky.app/profile/ember-energy.org/post/3n3omalzx3u23
2•DeepLogin•7m ago•1 comments

Relink Don't Rebuild

https://goals.rust-lang.org/2026/relink-dont-rebuild.html
1•zigzag312•9m ago•1 comments

How did this Flight Simulator Work?

1•ghastmaster•10m ago•0 comments

Show HN: Asset Tycoon

https://www.assettycoon.com/
1•st3f4no•11m ago•0 comments

Jensen Huang admitted that Nvidia chips had been diverted to China

https://www.cnbc.com/2026/12/02/jensen-huang-nvidia-chips-china-testimony.html
2•anVlad11•13m ago•1 comments

Show HN: Fieldbench - Local WASM/Linux CI bench for CAN-FD, DBC, BLF/MF4 & UDS

https://fieldbench.dev/
1•huckcity•13m ago•0 comments

Michael Caine Passed Away at Age 93

https://www.theguardian.com/film/2026/dec/01/michael-caine-alfie-get-carter-british-cinema-dies
1•rickdeckard•14m ago•1 comments

Fundamentals Still Matter

https://faidi.tech/posts/fundamentals-change-how-you-learn/
1•ghassenfaidi•14m ago•0 comments

'Slopaganda' Is Oxford's Word of the Year, and You'll Know It When You See It

https://www.cnet.com/tech/slopaganda-oxford-word-of-the-year/
1•speckx•17m ago•0 comments

Huawei releases trick to reduce the size of Diffusion models

https://huawei-csl.com/blog/diff4diff/
3•thefox96•19m ago•4 comments

Fast, slightly wrong code is the most expensive

https://mahmya.io/blog/idea-to-main-why-every-change-takes-22-steps/
2•praveenvijayan•20m ago•0 comments

Higher expectations associated with less pain after physiotherapy for knee OA

https://doi.org/10.1016/j.joca.2026.11.009
1•chavasorani•20m ago•0 comments

The internet is in its guano years

https://hrih.si/articles/the-internets-guano-years/
1•DonAtimator•21m ago•0 comments

Running a Google Nest thermostat inside QEMU

https://github.com/unfr0zen/qemu
1•khalidkhair•21m ago•0 comments

How AI made UK shopping history – by ordering nine pizzas

https://www.thetimes.com/business/entrepreneurs/article/first-ai-agent-cardless-transaction-papa-...
1•fork-bomber•22m ago•0 comments

Forume: A public square for you and me

https://forume.org/
1•doener•23m ago•0 comments

Euro NCAP will mark down cars whose safety warnings drive you mad

https://www.autonext.co/news/euro-ncap-annoying-safety-warnings-2029
1•apt-get•23m ago•0 comments

Creator of Heretic found dead, a day after GitHub goodbye

https://www.indiatoday.in/technology/news/story/creator-of-popular-ai-uncensoring-tool-heretic-fo...
1•ciefa•24m ago•1 comments

Game Reviewer Sued for £150M

https://www.youtube.com/watch?v=nT5LsXpMdJA
1•vorticalbox•25m ago•0 comments

"They cut off everyone else's legs instead of dealing with the actual problem"

https://www.gamesindustry.biz/they-cut-off-everyone-elses-legs-instead-of-dealing-with-the-actual...
1•speckx•25m ago•0 comments

Jellykit: Free Online Tools, No Upload

https://jellykit.site/
1•fratellobigio•27m ago•0 comments

The man who keeps over 20% of the Internet running

https://review.firstround.com/dane-knecht-cloudflare/
1•jgrahamc•29m ago•0 comments

NewzPage: RSS Feeds as an Old Newspaper

https://www.newz.page/
1•equites-digital•29m ago•0 comments

Introduces DuckDB Scales, Extending DuckDB Analytics Beyond a Single Machine

https://ducklabs.com/press/ducklabs-introduces-duckdb-scales/
1•zazuke•30m ago•0 comments

Product Owners Belong in the Codebase

https://arrangeactassert.com/posts/product-owners-belong-in-the-codebase/
1•kiyanwang•33m ago•0 comments