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

General-purpose large language models outperform specialized clinical AI

https://www.nature.com/articles/s41591-026-04431-5?brid=YWdncwFKdLH5ne5BLVS2Tb5UQSQa&utm_id=97757...
1•doener•1m ago•0 comments

A zero-copy C/Python DFA engine that scrubs logs at 571 MB/s

https://github.com/thedevilhimselfcodes/guardog
1•LuciferLK•3m ago•0 comments

'A man of great appetites': what's it like to be a dictator's personal chef?

https://www.theguardian.com/film/2026/jun/09/how-to-feed-a-dictator-film
1•Michelangelo11•3m ago•0 comments

The Last Open Frontier

https://www.mikehyland.com/blog/frontier-model-government-shutdown
1•mjhyl•6m ago•0 comments

Right to Repair: The Battle You Didn't Know You Were Fighting (video)

https://www.youtube.com/watch?v=ZaX20zv-Xw4
1•mdp2021•6m ago•0 comments

Ask HN: Could someone please invite me to Lobste.rs?

1•ML0037•9m ago•0 comments

AI inequality: from GPU-poor to token-poor

https://adlrocha.substack.com/p/adlrocha-ai-inequality-from-gpu-poor
1•adlrocha•10m ago•0 comments

Show HN: Memoriq – Open-source encrypted vault for saving and searching AI chats

https://github.com/memoriqme/memoriq
1•giekaton•11m ago•0 comments

RoleDecoder

https://roledecoder.com/
1•Mohammad_1ta•12m ago•0 comments

SemanticSourceCode – Local semantic code search with Ollama and SQLite

https://github.com/TheEifelYeti/SemanticSourceCode
1•EifelYeti•15m ago•0 comments

Shipping Outside the App Store

https://keylight.dev/blog/launch-mac-app-outside-app-store/
1•dmzxnico•18m ago•0 comments

Four LTS Java Versions Get End-of-Support in a Three-Year Window (2029-2032)

https://m.slashdot.org/story/455546
1•ilreb•19m ago•0 comments

Show HN: AppLaunch – Local Service App Builder

https://applaunch.teamzlab.com/
1•mdhemalakhand•20m ago•0 comments

UNK_DeadDrop Phishing Campaign Targets Developers to Steal Cryptocurrency

https://www.proofpoint.com/us/blog/threat-insight/dont-fear-repo-unkdeaddrop-phishing-campaign-ta...
2•denysvitali•22m ago•0 comments

Ask HN: What is your blog and why should I read it?

2•chistev•24m ago•1 comments

A policy enforcement layer for MCP tool execution using Rego

https://github.com/marvior/regentix
1•walmol•25m ago•0 comments

Macaroni Messenger 1.03 – small documentation fixes

https://github.com/vanyapr/makaroshki/releases/tag/v1.03
2•snowflaxxx•32m ago•1 comments

Laser Phase Plate Cryo-Electron Microscopy

https://biohub.org/blog/laser-phase-plate-cryo-em-making-invisible-visible/
3•peteforde•36m ago•0 comments

AI Is Bringing Mashups Back

https://www.wolfe.id.au/2026/06/12/ai-is-bringing-mashups-back
2•markwolfe•40m ago•0 comments

N-Tier Services and Systems Complexity

https://yegge.ai/essays/services-and-complexity/
2•tosh•43m ago•0 comments

AI Memory Is Still Thinking Like Search

https://medium.com/@jeffreyflynt02/ai-memory-is-still-thinking-like-search-e07566311efe
4•jflynt76•44m ago•0 comments

Show HN: Have your agent consult other models

https://github.com/raine/consult-llm
2•rane•46m ago•0 comments

Final run for the current LHC accelerator (but more to come)

https://www.nikhef.nl/en/news/final-run-for-the-current-lhc-accelerator-but-more-to-come/
3•elashri•57m ago•2 comments

Have politics come for the National Academies of Science?

https://arstechnica.com/science/2026/06/have-politics-finally-come-for-the-national-academies-of-...
1•rbanffy•59m ago•0 comments

Hacking Salesforce Sites with an LLM Agent

https://www.reco.ai/blog/hacking-salesforce-sites-with-an-llm-agent
2•llmacpu•1h ago•1 comments

Why the US economy keeps defying the odds

https://www.bbc.com/news/articles/cwy031el03po
1•ilreb•1h ago•1 comments

Anthropic Is Taking AI Welfare Seriously. I'm Not Sure It Knows What It's Measu

https://www.lesswrong.com/posts/gNtHHCh363xSGJyz3/anthropic-is-taking-ai-welfare-seriously-i-m-no...
2•joozio•1h ago•0 comments

I accidentally hit SOTA on agentic memory by using AI companions

https://graph.coder.company/
2•vignesh_146•1h ago•3 comments

Local Models in Mid-2026

https://coles.codes/posts/local-models-mid-2026
1•colescodes•1h ago•0 comments

Google's Pinpoint is the free research tool you should know about

https://www.fastcompany.com/91558438/googles-pinpoint-is-the-free-research-tool-you-should-know-a...
2•OutOfHere•1h ago•1 comments