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

Show HN: Building a product for humans and AI agents

https://slobodan.me/posts/introducing-competitor-tracker/
1•slobodan_•47s ago•0 comments

How to hire an AI-native product manager

https://www.theaithinker.com/p/how-to-hire-an-ai-native-product
1•adamfaik•51s ago•0 comments

Moon Phase and Libration

https://svs.gsfc.nasa.gov/5415/
2•carlosjobim•3m ago•0 comments

Show HN: Grid Words – sudoku meets Wordle meets crosswords

https://www.gridwordsgame.com/
1•jschomay•3m ago•0 comments

GoCD MCP Server

https://github.com/Ivinco/gocd-mcp
1•snikolaev•5m ago•0 comments

Perfection Is Not Over-Engineering

https://var0.xyz/posts/perfection-is-not-over-engineering.html
4•var0xyz•6m ago•0 comments

Firefox 153.0 Beta

https://www.firefox.com/en-US/firefox/153.0beta/releasenotes/
1•Erenay09•7m ago•0 comments

Automating Safari Extension Publishing with GitHub Actions

https://rxliuli.com/blog/automating-safari-extension-publishing-with-github-actions/
1•rxliuli•7m ago•0 comments

We can now track animal panic from space. Here's why it matters

https://www.bbc.com/future/article/20260521-tracking-animal-panic-from-space
1•speckx•9m ago•0 comments

China bans AI "boyfriends" and "girlfriends" over addiction, birth rate concerns

https://www.dexerto.com/entertainment/china-bans-ai-boyfriends-and-girlfriends-over-addiction-and...
2•randycupertino•12m ago•1 comments

Ahrefs free DR API Authentication starting August 10 2026

https://docs.ahrefs.com/en/api/reference/public/get-domain-rating-free
1•rexthonyy•12m ago•0 comments

Hyprland 0.56 Released

https://www.phoronix.com/news/Hyprland-0.56
2•Erenay09•12m ago•0 comments

Git email patch review addon for Thunderbird

https://mccd.space/git/thunderbird-patch-review/file/README.html.html
2•olexsmir•13m ago•0 comments

Ask HN: Claude's Unexpected Blind Test: Users = Data = Value?

1•Leewen•14m ago•0 comments

Show HN: CodeTrain – an AI tutor that refuses to write code for you

https://codetrain.ai
1•inferhaven•15m ago•0 comments

Tested Kimi K3 for Coding (2026)

https://www.dotnetperls.com/2026_7_18_tested-kimi-k3-coding
2•speckx•15m ago•0 comments

Frequently Asked Questions on Expertise

https://jtpeterson.substack.com/p/faq-on-expertise
1•surprisetalk•16m ago•0 comments

Meta Garbage Collection: Using OCaml's GC to GC Rust

https://soteria-tools.com/blog/meta-garbage-collection
2•annieversary•16m ago•0 comments

Thread: Differentiable Self-Organizing Systems

https://distill.pub/2020/selforg/
1•lioeters•16m ago•0 comments

The Age of Founder Control

https://tribunemag.co.uk/2026/07/the-age-of-founder-control
1•robtherobber•17m ago•0 comments

Show HN: Making 10-minute AI movies with Claude Code and Higgsfield ($200 each)

https://github.com/dawndrain/movie-gen
1•dawndrain•19m ago•1 comments

Sandbox Escape Vulnerabilities Across 4 Coding Agent Vendors

https://www.pillar.security/blog/the-week-of-sandbox-escapes
8•fogeltine•19m ago•4 comments

Flock License Plate Tracking Cameras

https://www.schneier.com/blog/archives/2026/07/on-flock-license-plate-tracking-cameras.html
4•pavel_lishin•19m ago•0 comments

Public Transport – Don't Make Me Think

https://shkspr.mobi/blog/2026/07/public-transport-dont-make-me-think/
2•pavel_lishin•19m ago•0 comments

Show HN: Pathfinding Puzzle Game

https://pathology.thinky.gg/
1•k2xl•20m ago•0 comments

Visualizing the Artemis II Mission

https://foxglove.dev/blog/visualizing-the-artemis-ii-mission
1•intrepidsoldier•20m ago•0 comments

Deterministic LLM router with a cryptographic audit trail – TEIA

https://github.com/felippebarcelos/teia-omega-awakening
1•felippebarcelos•20m ago•0 comments

The Washing-Machine Tragedy, by Stanisław Lem (1963)

https://www.newyorker.com/magazine/1981/11/30/the-washing-machine-tragedy
3•yesturi•23m ago•0 comments

Democratizing Abandonware

https://geopjr.dev/blog/democratizing-abandonware
1•AdmiralAsshat•23m ago•0 comments

Using LLM-Based Verification to Eliminate Bugs in Linux's Network Stack

https://www.basis.ai/blog/verified-nftables/
1•gopiandcode•24m ago•0 comments