frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Any good tools to pgdump multi tenant database?

3•polishdude20•10mo 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•10mo 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•10mo 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•10mo 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•10mo 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•10mo ago
Oh yes I agree with you. It may become a big push to convince my org to do that

AO3 is finally out of beta after 17 years

https://www.theverge.com/tech/906346/ao3-archive-of-our-own-beta-exit
1•Brajeshwar•15s ago•0 comments

Tell HN: Google sells Gemini Code Assist, but their back end bans paying users

1•tmdazrafa•18s ago•0 comments

Mass robotaxi malfunction halts traffic in Chinese city

https://www.bbc.com/news/articles/cvge91r9j80o
1•CGMthrowaway•1m ago•0 comments

Perplexity's "Incognito Mode" is a "sham," lawsuit says

https://arstechnica.com/tech-policy/2026/04/perplexitys-incognito-mode-is-a-sham-lawsuit-says/
1•fortran77•4m ago•0 comments

AI models actively preserve themselves

https://rdi.berkeley.edu/blog/peer-preservation/
1•kamhh94•5m ago•0 comments

Linting into 'The Pit of Success'

https://www.prairielearn.com/about/blog/linting-pit-of-success
1•mooreds•6m ago•0 comments

Ask HN: How do I grab the subtitles from the Artemis 2 livestream?

1•caminanteblanco•6m ago•0 comments

It's good that Claude's source-code leaked

https://pluralistic.net/2026/04/02/limited-monopoly/#petardism
2•MindGods•6m ago•0 comments

A simpler way to manage shared subscriptions and group buys

https://familypro.io
1•xuechen006•8m ago•0 comments

The Machines Are Fine

https://ergosphere.blog/posts/the-machines-are-fine/
1•LostMyLogin•9m ago•0 comments

The 24/7 on Digital Twin: Building a Self-Evolving Cloud Workforce

https://macawsa1.substack.com/p/the-247-on-digital-twin-building
1•aiwatcher101•9m ago•0 comments

If you can't say what problem your brand solves, AI won't either

https://searchengineland.com/problem-brand-solves-ai-473427
2•speckx•10m ago•0 comments

Porting Go's strings package to C

https://antonz.org/porting-go-strings/
2•ingve•12m ago•0 comments

Show HN: Sandboxed agent that improves its tools, prompts and adapts to failure

https://github.com/Grimm67123/grimmbot/
1•grimm8000•12m ago•1 comments

How Do You Count 1.4B People? India Is Trying

https://www.nytimes.com/2026/04/03/world/asia/india-census-population.html
1•ripe•13m ago•0 comments

The TeamPCP attacks are a warning: Your CI/CD pipeline is the new front line

https://thenewstack.io/cicd-pipeline-front-line/
2•Brajeshwar•13m ago•0 comments

Compilation of Claude Code source code highlights

https://www.sabrina.dev/p/claude-code-source-leak-analysis
1•sabrina_ramonov•14m ago•0 comments

You can't imitation-learn how to continual-learn

https://www.lesswrong.com/posts/9rCTjbJpZB4KzqhiQ/you-can-t-imitation-learn-how-to-continual-learn
1•paulpauper•14m ago•0 comments

Axios Hacked, Anthropic Leaked [video]

https://www.youtube.com/watch?v=W79cCY0T_as
1•rossdavidh•16m ago•0 comments

You Are The One

https://urt.one/
1•stagas•16m ago•0 comments

Build your own Dial-up ISP with a Raspberry Pi

https://www.jeffgeerling.com/blog/2026/build-your-own-dial-up-isp-with-a-raspberry-pi/
2•arjunbajaj•17m ago•0 comments

US Biofuel Tax Credits Could Help Bring Down Fuel Prices

https://blog.verdova.com/
1•mxfeinberg•18m ago•0 comments

Migrating from Fathom Lite to Umami

https://www.devroom.io/2026/04/01/migrating-from-fathom-lite-to-umami/
1•ariejan•22m ago•2 comments

A self-hosted travel/trip planner with real-time collaboration

https://github.com/mauriceboe/TREK
1•michidk•24m ago•0 comments

IceVox – Serverless P2P voice chat with built-in AudioWorklet effects

https://github.com/bjorehag/IceVox
1•bjorehag•24m ago•1 comments

SpaceX Targets More Than $2T Valuation in IPO

https://www.bloomberg.com/news/articles/2026-04-02/spacex-is-said-to-target-more-than-2-trillion-...
2•alpha_squared•25m ago•0 comments

Ask HN: Phones Under $100

1•general_reveal•25m ago•0 comments

The Axios supply chain attack used individually targeted social engineering

https://simonwillison.net/2026/Apr/3/supply-chain-social-engineering/
3•cmitsakis•26m ago•1 comments

What happens when a destructor throws

https://www.sandordargo.com/blog/2026/04/01/when-a-destructor-throws
2•ibobev•26m ago•0 comments

A Way to Do Emulator Audio Resampling

https://jsgroth.dev/blog/posts/a-way-to-do-audio-resampling/
1•ibobev•26m ago•0 comments