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

Anthropic and Alignment

https://stratechery.com/2026/anthropic-and-alignment/
1•stochastician•1m ago•0 comments

I used Claude Code's agent teams on a production incident (field report)

https://magarcia.io/using-claude-code-agent-teams-for-incident-investigation/
1•martinprins•2m ago•0 comments

Show HN: HNWatch – Keyword monitoring for Hacker News with AI-scored digests

https://hnwatcher.watch
1•moehj•2m ago•0 comments

Watershed Moment for AI–Human Collaboration in Math

https://spectrum.ieee.org/ai-proof-verification
1•sohkamyung•5m ago•0 comments

OpenAI's 'Red Lines' Speak the NSA's Language

https://www.techdirt.com/2026/03/02/openais-red-lines-are-written-in-the-nsas-dictionary-where-wo...
1•cdrnsf•6m ago•0 comments

A Review of Uncle Bob's Functional Design: Principles, Patterns, and Practices

https://coding-mischief.com/?p=43
1•luca_takahashi•9m ago•0 comments

Apple Changes Trade-In Values for iPhones, Macs, and More

https://www.macrumors.com/2026/03/02/apple-trade-in-values-changed/
1•mgh2•10m ago•0 comments

Tampons in the men's room helped derail the Netflix-Warner Bros. deal

https://nypost.com/2026/03/01/business/how-tampons-in-the-mens-room-helped-derail-the-netflix-war...
1•greenchair•11m ago•0 comments

Show HN: Set of Braille Unicode spinners as React decorator components

https://github.com/agilek/cli-loaders
1•agilek•11m ago•0 comments

Iranians face third day of internet blackout as connectivity hits 1%

https://www.techradar.com/vpn/vpn-privacy-security/near-complete-shutdown-iranians-face-third-day...
2•geox•11m ago•0 comments

Show HN: I simulated 1200 Iranian missiles attacking air defences in a browser

https://airdefense.dev/iran
2•possiblelion•12m ago•0 comments

A simplified guide to TRS MIDI

https://minimidi.world/
1•jmole•12m ago•0 comments

How to Kill the Code Review

https://www.latent.space/p/reviews-dead
1•swyx•14m ago•1 comments

Yahoo Scout Beta

https://scout.yahoo.com
3•broabprobe•14m ago•0 comments

CreeperGIT

https://git.creepernet.qzz.io
1•heckersdata•16m ago•0 comments

The Remaking of Thomas Mann

https://www.commonwealmagazine.org/thomas-mann-magic-mountain-jensen
1•benbreen•16m ago•0 comments

Code Corners: A platform-agnostic alternative to GitHub Corners

https://codecorners.rknight.me
1•rknightuk•19m ago•0 comments

Show HN: M8tes.ai – AI teammates that do your work

https://www.m8tes.ai/
1•JacobCreator•19m ago•0 comments

Prolonged U.S.-Iran conflict could trigger major energy shock in eurozone

https://nltimes.nl/2026/03/02/ing-prolonged-us-iran-conflict-trigger-major-energy-shock-eurozone
3•TechTechTech•20m ago•0 comments

Does the war on Iran prove it's time to quit oil for good?

https://www.euronews.com/2026/03/02/a-world-chained-to-fossil-fuels-does-the-war-on-iran-prove-it...
2•doener•24m ago•0 comments

The 185-Microsecond Type Hint

https://blog.sturdystatistics.com/posts/type_hint/
7•kianN•27m ago•1 comments

Welcome to My Virtual Office

https://valerii15298.github.io/
1•mooreds•28m ago•0 comments

Will AI Replace You?

https://candidate.perfectly.so/roast
1•lopespm•28m ago•0 comments

Show HN: ThinkFirst – The Anti-ChatGPT for Students

https://apps.apple.com/us/app/thinkfirst-ai-homework-help/id6759180853
1•alibasharat5•28m ago•0 comments

What to know about the Strait of Hormuz

https://apnews.com/article/strait-hormuz-iran-energy-war-5b60e82ef2fc68e2b43aa570a32404dd
1•mooreds•28m ago•0 comments

ToolMisuseBench: A deterministic benchmark for tool-augmented Agents

https://huggingface.co/datasets/sigdelakshey/ToolMisuseBench
1•akgitrepos•29m ago•2 comments

Deception, Lies, and Valve [video]

https://www.youtube.com/watch?v=13eiDhuvM6Y
1•streetfighter64•30m ago•0 comments

Music Streaming Economics: 6.9M Streams and a Full Cross‑Platform Payout Dataset

https://www.lackluster.org/support/
1•conner_bw•30m ago•0 comments

8th Wall is now open source

https://8thwall.org/
1•2001zhaozhao•32m ago•0 comments

Show HN: Drawbridge – Drop-In SSRF Protection for Python

https://github.com/tachyon-oss/drawbridge
1•logicx24•32m ago•0 comments