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

Where Is GPT in the Chomsky Hierarchy?

https://fi-le.net/chomsky/
1•fi-le•4m ago•0 comments

Show HN: Add keyboard shortcuts to any site with a browser extension

https://github.com/one-with-violets-in-her-lap/bind
1•sleep678765•10m ago•0 comments

OpenAI Ends 'Vesting Cliff' for New Employees in Compensation-Policy Change

https://www.wsj.com/tech/ai/openai-ends-vesting-cliff-for-new-employees-in-compensation-policy-ch...
1•divbzero•13m ago•0 comments

Rat Dystopia

https://demystifysci.com/blog/2020/7/22/rat-dystopia
1•certyfreak•13m ago•0 comments

BA fears a future where AI agents pick flights and brands get ghosted

https://www.theregister.com/2025/12/13/british_airways_fears_a_future/
2•zeristor•17m ago•0 comments

Sloot Digital Coding System

https://en.wikipedia.org/wiki/Sloot_Digital_Coding_System
1•rmason•17m ago•0 comments

Will Larson Reflects on Staff Engineer [video]

https://www.youtube.com/watch?v=RBPtGtMY8bE
1•mooreds•18m ago•0 comments

Protect Earth creates and restores woodlands, meadows, and hedgerows in the UK

https://www.protect.earth
1•mooreds•19m ago•0 comments

Codewave

https://github.com/techdebtgpt/codewave
1•handfuloflight•24m ago•0 comments

IBM: What if quantum computing is as fundamental as the origin of zero?

https://www.ibm.com/think/news/is-quantum-computing-as-fundamental-as-origin-of-zero
3•donutloop•25m ago•0 comments

UK doubles down on its quantum bet

https://www.politico.eu/article/uk-government-doubles-down-quantum-physics-computing-bet-starmer/
1•donutloop•26m ago•0 comments

From sci-fi to reality: Researchers realise quantum teleportation using tech

https://cordis.europa.eu/article/id/462587-from-sci-fi-to-reality-researchers-realise-quantum-tel...
5•donutloop•26m ago•0 comments

Stacked Diffs on GitHub

https://twitter.com/jaredpalmer/status/1999525369725215106
3•pryz•27m ago•1 comments

Long Covid involves activation of proinflammatory and immune exhaustion pathways

https://idp.nature.com/authorize?response_type=cookie&client_id=grover&redirect_uri=https%3A%2F%2...
4•bookofjoe•28m ago•0 comments

RAMageddon is coming for your smartphones and laptops

https://www.tomsguide.com/computing/laptops/worsening-ram-crisis-starting-to-impact-smartphones-a...
1•walterbell•30m ago•0 comments

Securing Coolify Cluster with Tailscale

https://taner-dev.com/articles/securing-coolify
3•morenatron•32m ago•0 comments

MicroEMACS

https://en.wikipedia.org/wiki/MicroEMACS
1•doener•33m ago•0 comments

Liberal-coded economic policies lose support in polls when proposed by Trump

https://www.politico.com/interactives/2025/trump-democratic-policies-midterms-polling/
4•alephnerd•33m ago•1 comments

Developers have canceled nearly 2k power projects this year – report

https://seekingalpha.com/news/4530351-developers-have-canceled-nearly-2000-power-projects-this-ye...
1•thelastgallon•35m ago•0 comments

The <time> element should do something

https://nolanlawson.com/2025/12/14/the-time-element-should-actually-do-something/
1•todsacerdoti•38m ago•1 comments

Google's Advent of Agents

https://adventofagents.com/
2•shubham_saboo•39m ago•0 comments

Show HN: In-browser data exploration toolkit

https://github.com/Datakitpage/Datakit
2•parsabg•43m ago•0 comments

The Future of the Linux-rs Project

https://mateolafalce.github.io/2025/The%20Future%20of%20the%20Linux-rs%20Project/TheFutureoftheLi...
1•lafalce•44m ago•1 comments

Muslim hero risked his own life to save others

https://ahmedelahmed.com
3•dorongrinstein•45m ago•3 comments

Anthropic Outage for Opus 4.5 and Sonnet 4/4.5 across all services

https://status.claude.com/incidents/9g6qpr72ttbr
76•pablo24602•48m ago•40 comments

Ozymandias

https://blog.engora.com/2025/12/ozymandias.html
2•Vermin2000•48m ago•1 comments

The Plan Is the Program

https://www.proofofconcept.pub/p/the-plan-is-the-program
1•herbertl•50m ago•0 comments

AI will transform science. Just not the way you think

https://ischemist.com/writings/long-form/will-ai-transform-science
1•hiddenseal•51m ago•0 comments

My Battle with Datetimes in Prod

https://www.datacompose.io/blog/fun-with-datetimes
2•tccole•51m ago•1 comments

Distropack now supports TAR archives aside from RPM DEB and PKG

https://distropack.dev/Blog/Post?slug=introducing-tar-package-support-simple-distribution-without...
1•segfault0x23•54m ago•1 comments