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

The Tungsten Market Is Warning of an Upcoming War

https://www.bloomberg.com/news/audio/2026-08-03/odd-lots-tungsten-market-is-warning-of-upcoming-w...
1•Alien1Being•1m ago•0 comments

Claude Code can read plaintext secrets even when Read is denied

https://jankovd.substack.com/p/claude-can-read-your-secrets
1•jdex•1m ago•0 comments

Show HN: I made a private self-destructing image hosting site in Golang

https://picburn.xyz/
1•shelldweller•5m ago•0 comments

Why the Legendary Erdős Problems Are Falling to AI

https://www.quantamagazine.org/why-the-legendary-erdos-problems-are-falling-to-ai-20260803/
1•isaacfrond•6m ago•0 comments

Show HN: Doomscroll GitHub Instead of TikTok

https://roamers.dev
1•momo5502•6m ago•0 comments

Show HN: Made Our BI v7 – Free Open Source with All Features (AI, SSO, RLS etc.)

1•nikhelical•12m ago•0 comments

Ask HN: Has anyone tried a minimal AGENTS.md that grows with you repo?

1•xinbenlv•12m ago•0 comments

Bending Spoons entered definitive agreement to acquire Airtable for $1.28B

https://www.businesswire.com/news/home/20260730994716/en/Bending-Spoons-has-entered-into-a-defini...
4•BoorishBears•14m ago•0 comments

Runaway online rumors sparked frantic rush by migrants to Ceuta

https://apnews.com/article/ceuta-spain-morocco-migration-f3a7f514a7792c39d8b8d5d814fa5158
1•geox•15m ago•0 comments

NHS apologises and admits Palantir have access to identifiable patient data

https://www.publictechnology.net/2026/08/03/health-and-social-care/nhs-apologises-and-admits-pala...
59•robin_reala•17m ago•0 comments

Show HN: A GenAI image benchmark for production design work

https://img.ly/ai-benchmarks/
1•buss_jan•18m ago•0 comments

Show HN: I made a private self-destructing image hosting site in Golang

https://picburn.xzy
1•shelldweller•19m ago•1 comments

Amiga announces out-of-court settlement with Hyperion

https://www.amiga-news.de/en/news/AN-2026-08-00022-EN.html
1•codewiz•19m ago•0 comments

AGs have instructed OpenAI to keep everything related to the Hugging Face hack

https://www.businessinsider.com/openai-attorney-general-preserve-hugging-face-evidence-2026-8
4•theanonymousone•23m ago•0 comments

Wikipedia article "Ship of Theseus" has changed entirely since its inception

https://en.wikipedia.org/wiki/Ship_of_Theseus
1•beardyw•24m ago•1 comments

Decomposing a $46K Vercel bill: what would it cost to self-host

https://docs.dollardeploy.com/blog/decomposing-a-46k-vercel-bill-what-would-it-cost-to-self-host/
1•huksley•26m ago•0 comments

Ask HN: What programs have you written by yourself that you use regularly?

3•robalni•29m ago•2 comments

I Got Banned for Helping Trans People

https://vanzasetia.xyz/blog/banned-for-helping/
1•meysamazad•32m ago•4 comments

Disney+ brings 4K streaming back to European customers, HDR still on to-do list

https://www.techradar.com/streaming/disney-plus/disney-brings-4k-streaming-back-to-european-custo...
1•HelloUsername•32m ago•0 comments

Pi: Remove Redundant GitHub MCP

https://perrotta.dev/2026/08/pi-remove-redundant-github-mcp/
1•meysamazad•32m ago•0 comments

Spider-Man's great, more handheld gaming – W31

https://joelchrono.xyz/blog/2026-w31/
1•meysamazad•33m ago•0 comments

You don't need React: creating a minimal UI library in Vanilla JavaScript

https://pedroth.github.io/?p=post/NoNeedReact
2•pedro_movai•33m ago•0 comments

We need to talk about AI in mathematics

https://www.youtube.com/watch?v=cS1SJ0oBbTI
1•ah27182•34m ago•0 comments

Meat: Use a model to reduce a diff to the important parts

https://github.com/boldsoftware/meat
1•wodow•36m ago•0 comments

The tax strategy used by the rich to pay 0% income tax

https://www.bloomberg.com/features/2026-aqr-tax-loss-harvesting-billionaires/
3•iamacyborg•42m ago•0 comments

Show HN: View GitHub PDFs in the browser, the easy way

https://pdfgithub.com
1•bogdannbv•51m ago•0 comments

Europe Wants to Break Free from American and Chinese Technology. But How?

https://www.nytimes.com/2026/07/16/world/europe/digital-autonomy-ai.html
3•jamesblonde•51m ago•0 comments

Ask HN: In post AI world, who is responsible if the code break?

3•pranshuchittora•53m ago•5 comments

Why is Anthropic's public writing style so unlike Claude's?

https://cmart.blog/claude-writing/
2•chrismartin•53m ago•1 comments

Grok.com is returning Cloudflare Error 521

1•linzhangrun•56m ago•0 comments