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

Chernobyl's Forgotten Internet [video]

https://www.youtube.com/watch?v=iZKw2H6d1SU
1•arbayi•2m ago•0 comments

Former executive sues Meta over attempts to 'silence' her memoir Careless People

https://www.latimes.com/business/story/2026-06-26/former-executive-sues-meta-over-attempts-to-sil...
1•1vuio0pswjnm7•3m ago•0 comments

Modern Web Guidance

https://master.dev/blog/modern-web-guidance/
1•ibobev•5m ago•0 comments

Factorio 2.1 Experimental Release

https://factorio.com/blog/post/fff-444
2•ibobev•8m ago•0 comments

Former executive sues Meta over attempts to 'silence' memoir Careless People

https://apnews.com/article/meta-wynnwilliams-lawsuit-silence-book-careless-people-652de34608da69b...
2•1vuio0pswjnm7•8m ago•0 comments

Meta-analysis of DNA methylation aging signatures in 17 human tissues

https://www.nature.com/articles/s43587-026-01164-5
1•bookofjoe•9m ago•0 comments

ICC judges sue convicted criminal Trump after US attempt to intimidate the court

https://www.yacnews.com/icc-judges-sue-convicted-criminal-donald-trump-after-us-attempt-to-intimi...
2•ortr•10m ago•0 comments

My First Atari ST

https://www.goto10retro.com/p/my-first-atari-st
1•ibobev•11m ago•0 comments

Ornith-1.0: A family of open-source LLMs specialized for agentic coding

https://twitter.com/ornith_/status/2070148887067963854
2•jalopy•15m ago•0 comments

U.S. government restricts access to OpenAI's new AI model

https://www.zeit.de/digital/2026-06/openai-gpt-5-6-ki-modell-sol-usa
1•chelm•16m ago•0 comments

Show HN: PreFlight – A local AST background daemon to catch AI code drift

https://preflight-vibe.vercel.app/
1•Avenassh•17m ago•0 comments

Apple's Raising Prices. Here's What That Means for the Rest of Tech

https://www.inc.com/connor-jewiss/apples-finally-raising-prices-heres-what-that-means-for-the-res...
1•connorjewiss•19m ago•0 comments

Students are doing worse than you think

https://economist.com/international/2026/06/25/students-are-doing-worse-than-you-think
2•pseudolus•21m ago•1 comments

Show HN: Codex can track external events with respect to internal data

https://app.getsupers.com/admin/growth
1•GPUboy•22m ago•0 comments

Designing a Personal Pebble Watchface

https://www.jonashietala.se/blog/2026/06/26/designing_a_personal_pebble_watchface/
1•dzogchen•26m ago•0 comments

UN Charter – United Nations

https://www.un.org/en/about-us/un-charter
1•jeeee•30m ago•0 comments

Fintech Engineering Handbook

https://w.pitula.me/fintech-engineering-handbook/
22•signa11•31m ago•1 comments

Show HN: Mcpify – Turn any REST API into an MCP server in one command

https://github.com/Amanbig/mcpify
1•harpreetsingh80•32m ago•0 comments

Properties of AI

https://claude.com/resources/tutorials/the-4-properties-of-ai
2•vinhnx•32m ago•0 comments

I'd Build a 864K Motivation Page a $225K/Year App [video]

https://www.youtube.com/watch?v=Y2AWF9xFuKE
1•Harro123•32m ago•0 comments

AI data centers are supercharging a new battery market

https://wpintelligence.washingtonpost.com/topics/energy-climate/2026/06/24/ai-data-centers-are-su...
1•bookofjoe•38m ago•1 comments

Rewriting the World in Rust

https://bitfieldconsulting.com/posts/rewrite-in-rust
2•vinhnx•38m ago•1 comments

Ask HN: How do we measure software in LLM era?

1•bonigv•42m ago•2 comments

Arbitraging the global trademark treaty system

https://filedmark.com
2•infiniteAdmin•43m ago•1 comments

Texas makes Bible passages required reading for public school students

https://www.theguardian.com/us-news/2026/jun/26/texas-bible-required-reading-public-school
1•geox•46m ago•1 comments

Show HN: Open-Source API for Asynchronous Tasks Using Agents

https://meerkatagents.com/
1•kannanreghu•56m ago•0 comments

Show HN: Play puzzle games in a feed like TikTok

https://puzzle.express
4•trancence•1h ago•2 comments

Pixar's Believable People

https://animationobsessive.substack.com/p/pixars-believable-people
2•vinhnx•1h ago•0 comments

One More Thing

https://take.surf/2026/06/07/one-more-thing
1•Udo_Schmitz•1h ago•0 comments

Getting LLMs Drunk to Find Remote Linux Kernel OOB Writes (and More)

https://heyitsas.im/posts/drinking-llms/
1•schmuhblaster•1h ago•0 comments