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

Fable Jailbreak (Circumvent safety net)

https://github.com/0xSufi/fable-jailbreak/
1•binyu•15s ago•0 comments

How AI Agents Reshape Knowledge Work

https://research.perplexity.ai/articles/how-ai-agents-reshape-knowledge-work
1•gmays•5m ago•0 comments

Ask HN: Releasing code under AGPLv3, but want to block LLM reconstruction?

3•zionsati•6m ago•0 comments

Become a Happier Person

https://www.psychologytoday.com/gb/blog/self-made/202606/become-a-happier-person
1•geoffbp•7m ago•0 comments

Show HN: Headroom – Claude Code usage limits, live in the macOS menu bar

https://headroom.walls.sh/
1•patwalls•13m ago•0 comments

Pynder – crowdsourcing and tracking scam call data

https://pynder.net/
1•schwwaaa•14m ago•0 comments

Show HN: Built a public demo to explore SpaceX's IPO filing using multimodal RAG

https://www.calypso.so/demos/spacex-ipo-filing
3•gabamnml•15m ago•1 comments

I Built a Hazel Alternative for Mac with AI Rule Generation

https://medium.com/@jamal_davis/i-built-a-hazel-alternative-for-mac-with-ai-rule-generation-heres...
1•Gotoorbitapp•16m ago•0 comments

Auto-geo – open-source CLI for GEO that helps get your brand mentioned by LLMs

https://github.com/shadowresearch/auto-geo
1•jessen-gibbs•21m ago•1 comments

The Parable of the Talents

https://slatestarcodex.com/2015/01/31/the-parable-of-the-talents/
1•shadow28•24m ago•0 comments

Manus registered my domain in their own name and won't release it

1•AeonCa•25m ago•1 comments

Co-Existence and the End of Co-Intelligence

https://www.oneusefulthing.org/p/co-existence-and-the-end-of-co-intelligence
1•paulpauper•25m ago•0 comments

The Labor Share Fell. So What?

https://marginalrevolution.com/marginalrevolution/2026/06/the-labor-share-fell-so-what.html
1•paulpauper•26m ago•0 comments

I've Solved Content Discovery Conditions May Apply

https://philosophybear.substack.com/p/ive-solved-content-discovery-conditions
1•paulpauper•26m ago•0 comments

Windows 11 sucks slightly less due to June update

https://www.engadget.com/2191909/windows-11-sucks-slightly-less-now-thanks-to-a-june-update/
4•NordStreamYacht•32m ago•0 comments

China-linked operatives used ChatGPT to influence data centers debate

https://www.axios.com/2026/06/10/openai-china-ai-data-center-tariffs-chatgpt
2•alephnerd•34m ago•1 comments

The Social Reckoning (official teaser trailer) [video]

https://www.youtube.com/watch?v=gM4LkaXwGuY
1•Fricken•37m ago•0 comments

WebODM: The Missing Guide

https://webodmbook.com
1•pierotofy•37m ago•0 comments

Plants Could Be Used to Grow Medicines in Space

https://today.ucsd.edu/story/plants-could-be-used-to-grow-medicines-in-space-study-shows
1•gmays•43m ago•0 comments

Starlink: The Constellation, Live

https://sheets.works/data-viz/starlink
1•jonbaer•44m ago•0 comments

Ask HN: Someone started a company same name, same city, industry

1•bxclltkfz•44m ago•0 comments

AdBreak – Jailbreaking the Kindle

https://kindlemodding.org/jailbreaking/AdBreak/
1•nivethan•46m ago•0 comments

The First 100 Wikipedia Pages

https://en.wikipedia.org/wiki/Wikipedia:First_100_pages
2•bananamogul•46m ago•2 comments

Return on Tokens (Rot)

https://www.notboring.co/p/return-on-tokens-rot
1•thedreammachine•47m ago•0 comments

Stop the Surveillance State [pdf]

https://epic.org/wp-content/uploads/2026/04/EPIC-Stop-the-Surveillance-State-5.pdf
1•Cider9986•47m ago•0 comments

Few things in DC are more predictable than Congress renewing surveillance powers

https://xcancel.com/RepThomasMassie/status/2064849178249892220
4•Cider9986•49m ago•0 comments

China's BYD aims to be biggest car firm within five years

https://www.theguardian.com/business/2026/jun/10/china-byd-car-firm-ev-maker-toyota
4•teleforce•49m ago•0 comments

A short history of Cerro Torre, the most controversial mountain

https://www.markhorrell.com/blog/2012/a-short-history-of-cerro-torre/
3•joebig•56m ago•0 comments

Vector memory database remembers everything. That's the issue

https://medium.com/@vektormemory/your-vector-memory-database-remembers-everything-thats-exactly-t...
2•vektormemory•57m ago•0 comments

AWS Graviton5's improved design increases speed and energy efficiency

https://www.amazon.science/blog/graviton5s-improved-design-increases-speed-and-energy-efficiency-...
3•tanelpoder•58m ago•0 comments