frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Any good tools to pgdump multi tenant database?

3•polishdude20•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo ago
Oh yes I agree with you. It may become a big push to convince my org to do that

The Holy Grail of Linux Binary Compatibility: Musl and Dlopen

https://github.com/quaadgras/graphics.gd/discussions/242
1•Splizard•2m ago•0 comments

Errors as Values in TypeScript

https://errore.org/
1•SouravInsights•3m ago•0 comments

Qualcomm CEO pockets 15% pay rise as profits fall 45%

https://www.theregister.com/2026/01/23/qualcomm_ceo_pay/
2•pjmlp•9m ago•0 comments

Trump Filter Chrome Extension

https://trumpfilter.com/
1•darktoto•10m ago•0 comments

Sorry

1•fainpul•11m ago•1 comments

Handling Long Branches

https://maskray.me/blog/2026-01-25-handling-long-branches
2•ingve•13m ago•0 comments

The end of the curl bug-bounty

https://daniel.haxx.se/blog/2026/01/26/the-end-of-the-curl-bug-bounty/
3•mmsc•15m ago•0 comments

Allowlist for .gitignore

https://blog.izissise.net/posts/gitignoreallowlist/
2•ingve•15m ago•0 comments

From zero traffic to launching my own independent news platform

1•ironspidex•15m ago•0 comments

'There's no other poem like it': Why this Robert Burns classic is a masterpiece

https://www.bbc.com/culture/article/20260122-why-this-robert-burns-poem-is-a-masterpiece
2•breve•16m ago•0 comments

Welcome to the "Email Expiration Date" Initiative

https://www.zerocarbon.email/
2•birdculture•17m ago•0 comments

Show HN: Image to 3D AI Generator – Instant 3D Models from Photos

https://heydream.im/image-to-3d/
2•HeyDream_AI•21m ago•0 comments

Ubuntu Pro subscription – should you pay to use Linux?

https://optimizedbyotto.com/post/ubuntu-pro-subscription-pay-for-linux/
2•ottoke•22m ago•2 comments

A Post-American, Enshittification-Resistant Internet [video]

https://www.youtube.com/watch?v=39jsstmmUUs
1•anhner•23m ago•0 comments

Show HN: Blockframe v1.0.3 Released

2•DeusCodex•27m ago•1 comments

A Comprehensive Guide for Backing Up Apple Notes on Your Mac

https://appledispatch.substack.com/p/comprehensive-guide-for-backing-up-apple-notes
2•simonebrunozzi•28m ago•0 comments

Ask HN: Which features are you searching in an AI assistant?

1•ProtosGalaxias•29m ago•1 comments

The ungentle joy of spider sex [2020]

https://knowablemagazine.org/content/article/living-world/2020/the-ungentle-joy-spider-sex
2•joebig•33m ago•0 comments

Library of Congress issues RFP for web harvesting services

https://sam.gov/workspace/contract/opp/a2c5551af2b74c3d84c775032c83a55e/view
1•mellosouls•37m ago•0 comments

Attempting to rebuild Ramp's background agent system in a weekend (on a Mac VM)

https://eliot.blog/p/attempting-to-rebuild-ramps-background
1•ea016•38m ago•0 comments

Cow Tools

https://en.wikipedia.org/wiki/Cow_tools
2•docdeek•38m ago•1 comments

Pandas 3 Upgrade Playlist

https://www.youtube.com/playlist?list=PLbFHh-ZjYFwFWHVT0qeg9Jz1TBD0TlJJT
1•reuven•38m ago•0 comments

Gwtar: A static efficient single-file HTML format – Gwern.net

https://gwern.net/gwtar
2•Antibabelic•40m ago•0 comments

Functioning Open Source Version of Lovable/Bolt/Replit

https://github.com/polterguy/magic
2•ainiro•47m ago•0 comments

Exhausting the Clang Preprocessor

https://blog.vursc.org/cpp-dos.html
2•isoow•48m ago•0 comments

Show HN: GLM-Image Dense-knowledge AI Generator

https://www.glmimage1.com
1•Zach_HE•50m ago•0 comments

How to think about Gas Town

https://steveklabnik.com/writing/how-to-think-about-gas-town/
2•wyldfire•53m ago•0 comments

Burhan (TruthCert): a fail-closed "ship gate" for LLM outputs

https://github.com/mahmood726-cyber/Burhan
1•mahmood726•55m ago•0 comments

Factorioctl: Claude Code Plays Factorio

https://github.com/MarkMcCaskey/factorioctl
1•maoeurk•56m ago•0 comments

My Talking Pet AI

https://mytalkingpet.ai/
1•Evan233•58m ago•1 comments