跳到正文
DEV Community· Anthony Emmanuella Mmasinachi·· 3 小時前AI 評分14

SaaS 租戶隔離應由應用程式還是 PostgreSQL 強制執行?

Backend engineers, settle this debate. Should a SaaS application EVER be trusted to enforce tenant isolation by itself? Or should PostgreSQL reject cross-tenant access even when application code makes a mistake? What's your production setup?

AI 導讀

Anthony Emmanuella Mmasinachi 向後端工程師提出,SaaS 租戶隔離應由應用程式還是 PostgreSQL 負責。文章追問,應否讓 PostgreSQL 在應用程式程式碼出錯時仍拒絕跨租戶存取,並徵詢讀者在正式環境中的做法。

正文

Skip to content

Image 1: DEV Community

Powered by Algolia

Log inCreate account

DEV Community

Image 20 Add reaction

Image 30 Like Image 40 Unicorn Image 50 Exploding Head Image 60 Raised Hands Image 70 Fire

0 Jump to Comments 0 Save Boost

Pick as gem

Copy link

Copied to Clipboard

Share to XShare to LinkedInShare to FacebookShare to Mastodon

Share Post via...Report Abuse

Image 8: Anthony Emmanuella Mmasinachi

Anthony Emmanuella Mmasinachi Posted on Oct 29

Backend engineers, settle this debate.

Should a SaaS application EVER be trusted to enforce tenant isolation by itself?

Or should PostgreSQL reject cross-tenant access even when application code makes a mistake?

What's your production setup?

Top comments (0)

Subscribe

Image 9: pic

Personal Trusted UserCreate template Templates let you quickly answer FAQs or store snippets for re-use.

Submit PreviewDismiss

Code of Conduct•Report abuse

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.

  • [x] Hide child comments as well

Confirm

For further actions, you may consider blocking this person and/or reporting abuse

Image 10Promoted

Image 11

Image 12: profile Tiger Data (Creators of TimescaleDB)Promoted


Image 13: Tiger Data image

Agent Memory Is a Search Problem, Not a Storage Problem ❌

Long-term conversational memory is the ability to recall and reason over months of past conversations. It is one of the hardest unsolved problems in AI assistants, and the field has converged on a shared assumption about how to solve it.

Read more →

Image 14 Anthony Emmanuella Mmasinachi

Follow

Founder of Agata Proxima | Full-Stack Developer building open-source PostgreSQL security tools with Rust. Focused on tenant isolation, database security, and scalable SaaS infrastructure.

  • Joined Oct 25, 2026

More from Anthony Emmanuella Mmasinachi

Your PostgreSQL Query Works. That's Exactly What Makes This Bug Dangerous. #opensource#security#rust#backendI Put a Rust Proxy Between My App and PostgreSQL. Here's What Happens to Every Connection. #database#postgres#rust#opensource

Image 15: profile TesslPromoted


Image 16: AI DevCon NYC

See how Anthropic, Google DeepMind, Microsoft & Booking.com build with AI agents at scale

The enterprise track brings honest, from-the-trenches stories — platform teams, agent governance, and models at scale — from the companies defining how AI ships to production. In Brooklyn, 02–04 Nov 2026. Use code MLH20 for 20% off any ticket.

Claim 20% off

Image 17Promoted

Image 18

👋 Kindness is contagious


Join DEV and unlock its full potential—access a tailored experience with dark mode, specific reading preferences, and much more.

Start Now

DEV Community — A space to discuss and keep up software development and manage your software career

Built on Forem — the open source software that powers DEV and other inclusive communities.

Made with love and Ruby on Rails. DEV Community © 2016 - 2026.

Image 19: DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log inCreate account

Image 20Image 21Image 22Image 23Image 24

來源:DEV Community · dev.to