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

Korea closes lifetime pension loophole based on 1 month's work

https://twitter.com/Unveiled_ChinaX/status/2099026824990962021
1•ilamont•18s ago•0 comments

Are you committed to team or company?(economist)

https://economist.com/business/2026/09/10/are-you-committed-to-your-company-or-your-teamfromTheEc...
1•sunjain•2m ago•0 comments

Anthropic CEO Calls for A.I. Slowdown

https://www.nytimes.com/2026/09/12/technology/anthropic-dario-amodei-ai-slowdown.html
1•joe_the_user•2m ago•1 comments

Ask HN: If embeddings are so powerful, why are they mostly used for retrieval?

1•Pranav_Ghoghari•6m ago•0 comments

AI keeps stubbornly refusing to take our jobs

https://www.noahpinion.blog/p/ai-keeps-stubbornly-refusing-to-take
1•firasd•6m ago•0 comments

The Relation Between Mathematics and Physics by Paul Dirac

https://www.damtp.cam.ac.uk/events/strings02/dirac/speach.html
1•rramadass•6m ago•0 comments

Show HN: "Am I GPU Poor?" Check how your GPU stacks against PC Gamers Worldwide

https://gpupoor.sykah.com/
1•dshahrokhian•7m ago•0 comments

Collapse of Personal Computing: Investigation into the Destruction of Ownership [video]

https://www.youtube.com/watch?v=zyQwAhppWj8
1•soraminazuki•8m ago•0 comments

Chances of Survival

https://qosys.info/chances-of-survival
1•earlybuilder•8m ago•0 comments

Filesystem Is Lying to You

https://faraazahmad.github.io/blog/posts/filesystem-is-lying-to-you/
1•faraaz98•9m ago•0 comments

Vector Balancing via Directional Total Variation

https://arxiv.org/abs/2609.11189
1•tamnd•10m ago•0 comments

Useful Things Agents Can Do That Are Not Writing Code

https://elijahpotter.dev/articles/useful-things-agents-can-do-that-are-not-writing-code
2•birdculture•13m ago•0 comments

ZLUDA – Drop-In Replacement for CUDA on Non-Nvidia GPUs

https://github.com/vosen/ZLUDA
1•peter_d_sherman•15m ago•1 comments

Audemars Piguet Neo Frame Jumping Hour

https://www.audemarspiguet.com/ch/en/watch-collection/neo-frame/15245OR.OO.A206VE.01
1•andsoitis•16m ago•0 comments

War has not halted the Gulf's data-centre boom

https://www.economist.com/business/2026/09/10/war-has-not-halted-the-gulfs-data-centre-boom
2•andsoitis•20m ago•0 comments

Better routing, probe fixes, plugin updates in Freenet/Hyphanet 0.7.5 build 1507

https://www.hyphanet.org/freenet-hyphanet-075-build-1507-fix-probe-routing-plugins-and-upkeep.html
1•ArneBab•21m ago•0 comments

Spectrogram – see your music as a moving 3D landscape

https://github.com/nijatburjiyev/spectral-relief
1•nijatburjiyev•21m ago•0 comments

US Military tests quantum sensors for flight navigation without GPS over Pacific

https://www.heise.de/en/news/US-military-tests-quantum-sensors-for-flight-navigation-without-GPS-...
2•marklit•22m ago•0 comments

Docket – Per-commit evidence records for agent-written code

https://github.com/Dillonsmart/docket
2•dillonsmartdev•27m ago•0 comments

How Modern Fascism Works – End Times Fascism – Naomi Klein and Astra Taylor

https://www.youtube.com/watch?v=aK2nLNiFEAQ
2•abathologist•28m ago•0 comments

The Case for Open-Weight Models and Why We Can't Trust Frontier Labs

https://www.provos.org/p/case-for-open-weight-models/
2•wslh•28m ago•0 comments

SecretGate – Hardened, self-hosted NGL alternative

https://github.com/sasiru-mindaka/Secret-Gate
1•sasiru-mindaka•31m ago•0 comments

Misleading Metaphors and Real Risks

https://aiguide.substack.com/p/misleading-metaphors-and-real-risks
2•lacunary•32m ago•0 comments

What's the smallest agent harness that is still architecturally complete?

https://github.com/earthwalker17/MiniDSH
1•earthwalker17•35m ago•0 comments

AI Tools Accelerates Coding, but Not Overall Software Delivery – GitLab Research

https://www.infoq.com/news/2026/06/ai-coding-outpaces-governance/
2•bucket2015•41m ago•0 comments

Dupster – A fast TUI for finding and removing duplicate files

https://github.com/karimz1/dupster
2•karimz1•41m ago•0 comments

Built a walkable 3D library of 200 public domain books

https://libraryafterdark.space/
3•theaijournalope•43m ago•1 comments

Show HN: MorphMove – a game where pieces change after moving

https://morphmove.com/
2•eropatori•45m ago•0 comments

Install iOS 27 today – there's no reason to wait

https://www.cultofmac.com/news/install-ios-27-today-how-to
4•bookofjoe•45m ago•0 comments

Research Paper: Sex, Politics, and Religion

https://nouswise.com/c/add2545d-a281-46a4-8d5c-3f186b85559b
2•kaven1234•45m ago•0 comments