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

Useful LLM Prompts for Editing Your Own Technical Writing

https://techstackups.com/articles/useful-llm-prompts-for-editing-your-own-technical-writing/
1•ritzaco•28s ago•0 comments

Ford rehires 'greybeards' after AI tech fails to deliver

https://www.msn.com/en-us/news/technology/ford-rehires-human-engineers-after-ai-fails-to-match-qu...
2•ilamont•2m ago•0 comments

Shipping post-quantum cryptography to Python

https://blog.trailofbits.com/2026/06/30/shipping-post-quantum-cryptography-to-python/
1•logickkk1•4m ago•0 comments

Forget Work. Passive Income Is the New American Dream

https://www.wsj.com/lifestyle/careers/passive-income-dreams-2e67ee5c
1•apparent•6m ago•0 comments

California Is Chasing Wealth That Has Feet

https://progressandpoverty.substack.com/p/california-is-chasing-wealth-that
2•slackpad•7m ago•1 comments

Millions take omega-3 fish oil for brain health but a new study found no benefit

https://www.sciencedaily.com/releases/2026/06/260622014300.htm
2•eustoria•9m ago•0 comments

Investigating Linux Graphics (2025)

https://roscidus.com/blog/blog/2025/06/24/graphics/
1•birdculture•9m ago•0 comments

Apple Just Fixed Mac Gaming and Said Nothing [video]

https://www.youtube.com/watch?v=3ZlPEsiaGiQ
2•lordleft•10m ago•0 comments

Show HN: 143.dev – we open-sourced our internal coding-agent infrastructure

2•johnjwang•10m ago•0 comments

Om

https://netwert.com/ideapad/2026/06/30/om/
2•eustoria•13m ago•0 comments

Impressions from Visiting OpenAI, Anthropic, & Cursor

https://newsletter.pragmaticengineer.com/p/impressions-from-visiting-openai
1•monkeydust•13m ago•0 comments

New Claude app strings, Fable 5 coming back only with verification

https://twitter.com/kimmonismus/status/2071868011804266828
3•garo-pro•13m ago•0 comments

Show HN: Build better UI with Hermes agents

https://www.typeui.sh/docs/guides/hermes
1•elwingo1•13m ago•0 comments

We Are All Weird

https://seths.blog/2026/06/we-are-all-weird-2/
2•eustoria•14m ago•0 comments

The first early human eggs from stem cells

https://www.conception.bio/science-and-updates/the-first-early-human-eggs-from-stem-cells
1•mattkrisiloff•15m ago•0 comments

I built a mmWave material classification radar

https://gauthier-lechevalier.com/radar
9•GL26•18m ago•0 comments

The Brain of a 319M-Year-Old Fossil Fish

https://nautil.us/inside-the-brain-of-a-319-million-year-old-fossil-fish-1282311
1•Brajeshwar•18m ago•0 comments

Claude Sonnet 5 Could Be Released Later Today, May Not Be Better Than Opus 4.8

https://old.reddit.com/r/singularity/comments/1ujt3ui/claude_sonnet_5_could_be_released_later_tod...
1•garo-pro•20m ago•1 comments

Show HN: I built an AI agent to yell at me about my ADHD

https://0xff.nu/hex/
1•hxii•23m ago•0 comments

Ask HN: How are you using AI agents for testings features?

1•pranshuchittora•23m ago•1 comments

Claude Tag

https://claude.com/docs/claude-tag/overview
1•akarshhegde18•24m ago•0 comments

Frontier Inference Clusters

https://www.etched.com
1•Marius77•25m ago•0 comments

Enforcing Invariants in AI-Generated Code with ADRs and Contracts

https://bitbytebit.substack.com/p/enforcing-invariants-in-ai-generated
1•recroad•25m ago•0 comments

No Memory of Its Own: Governing a Visiting Agent on Sovereign Data

https://pentad.ai/PLRN/016/
1•kgcgfva•26m ago•1 comments

More on the depolarizing effects of current AI

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6597184
2•paulpauper•28m ago•0 comments

Ask HN: Should I buy mac studio M4 max or macbook M5 pro?

2•akarshhegde18•28m ago•1 comments

Alex Ross is stepping down as music critic for The New Yorker

https://therestisnoise.com/personal-note-2/
2•paulpauper•28m ago•0 comments

Korinek, Autor, and Gimbel on AI and Jobs

https://www.wsj.com/economy/jobs/ai-jobs-economists-f787105d
1•paulpauper•29m ago•0 comments

AWS puts $1B into new AI unit to embed engineers with customers

https://www.cnbc.com/2026/06/30/aws-amazon-ai-forward-deployed-engineers.html
2•leopoldj•29m ago•0 comments

Show HN: NotebookLM style mindmap inside ChatGPT

https://chatgpt.com/apps/mindmap/asdk_app_69e1ea6c505c81918d6c8f0258a64906
1•IvanGoncharov•31m ago•0 comments