Multi-Tenancy With Postgres Row-Level Security in Ktor
Enforcing tenant isolation in the database instead of in every query
How I use Postgres Row-Level Security, a non-owner application role, and a small Kotlin transaction wrapper to guarantee tenant isolation in a production Ktor and Exposed application.
Posted by Jamie Craane on Thursday, July 9, 2026