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

UK on track for record heat-related deaths this year, UKHSA estimates

https://www.bbc.co.uk/news/articles/c0m78g01r8jo
1•ljf•1m ago•0 comments

Show HN: HuPow – Proof-of-Work to stop AI bots in your inbox

https://hupow.app
1•cmbza•1m ago•0 comments

The Cities That Said Yes to Drugs

https://www.theatlantic.com/magazine/2026/09/city-drug-addiction-harm-reduction-policy/687967/
2•SanjayMehta•2m ago•0 comments

Self-Hosting Agent-Built Apps on a Mac Mini: My Personal Software Journey

https://metedata.substack.com/p/016-my-personal-software-journey
1•young_mete•2m ago•0 comments

Show HN: Formae 0.88.0 Released

https://docs.formae.io/documentation/reference/release-notes
1•discountelf•2m ago•0 comments

Sandboxing Claude CLI with Tart on Apple Silicon

https://www.mrafayaleem.com/blog/sandboxing-claude-cli-with-tart-on-apple-silicon
1•iamspoilt•3m ago•0 comments

Postgres rewritten in Rust v0.2, now faster than Postgres and ClickHouse

https://pgrust.com/
1•booksock•4m ago•0 comments

Copyright Was Never Your Friend

https://mkultra.monster/copyright/2026/07/23/copyright-bad/
1•surprisetalk•5m ago•0 comments

Show HN: Tinbase – OSS Supabase-compatible back end in TypeScript

https://www.tinbase.dev/
2•sanketsahu•5m ago•0 comments

Who's suing AI, and who's signing

https://pressgazette.co.uk/platforms/news-publisher-ai-deals-lawsuits-openai-google/
2•thm•5m ago•0 comments

Email in the Tranco Top-1M: 10 years of DNS measurements

https://labs.ripe.net/author/artem-berezin/two-providers-a-stubborn-plateau-and-a-very-long-tail-...
1•ArtemBerzin•5m ago•0 comments

Meta's AI spending reduces quarterly free cash flow by 91%

https://www.reuters.com/business/retail-consumer/metas-ai-splurge-lays-bare-its-compute-conundrum...
2•johnbarron•6m ago•0 comments

I measured what SmartScreen costs an indie developer. It's about 4x

https://senticmoney.com/blog/smartscreen-cost-indie-developer
1•fdcampbell•7m ago•1 comments

AI coding agents should optimize for less owned code

https://www.openenergytransition.org/posts/ai-coding-agents-should-optimize-for-less-owned-code
1•lyoncy•7m ago•0 comments

Octane JavaScript

https://octanejs.dev
1•haburka•8m ago•0 comments

Mandelbrot-2: C++ visualizer with perturbation theory up to 1e-308

https://github.com/Divetoxx/Mandelbrot-2
1•Divetoxx•9m ago•0 comments

SpaceX Looks to Compete with the Carriers

https://www.semafor.com/article/07/29/2026/spacex-looks-to-compete-with-the-carriers
1•TMWNN•9m ago•0 comments

Openinterpreter: Terminal coding agent built for low-cost models

https://www.openinterpreter.com
1•nateb2022•10m ago•0 comments

I built a free deepfake detector that works directly from social media URLs

https://kweliai.com/
1•ProlificVA•11m ago•0 comments

Taking Extreme Measures to Avoid New Car Technology

https://www.wsj.com/lifestyle/cars/driver-assistance-technology-dashboard-ead96bd2
1•ike_usawa•11m ago•0 comments

Go LLM SDK for streaming, tool-calling AI backends (plus frontend React lib)

https://github.com/grafana/ai-sdk
6•matryer•11m ago•0 comments

Leadership Lessons from the Odyssey

https://danielmangum.com/posts/odyssey-leadership-lessons/
1•hasheddan•11m ago•0 comments

AI and the Enshittification Era W Cory Doctorow – Weekly Show with Jon Stewart [video]

https://www.youtube.com/watch?v=-dAIJRjb-Bw
1•nekusar•11m ago•0 comments

Æsh, Another Extensible SHell

http://aeshell.github.io/
1•ankitg12•12m ago•0 comments

HSIP – a self-hosted identity and audit trail for AI agents

https://github.com/rewired89/HSIP-1PHASE
1•Rewired89•14m ago•0 comments

Blankie – Ambient sounds for your flow state

https://blankie.rest/
1•ai2027•14m ago•0 comments

Copatch- The shared workspace for teams building with AI coding agents

https://copatch.ai/
1•malrokhayes•15m ago•0 comments

Radar – (Signal clone) Chats and sats in one place

https://radar.chat/
1•janandonly•17m ago•0 comments

Show HN: Get an email when your favorite actor/director releases something new

https://www.premierepal.com/
1•samteeeee•20m ago•0 comments

AgentTrace: A Structured Logging Framework for Agent System Observability

https://arxiv.org/abs/2602.10133
1•ankitg12•21m ago•0 comments