Things that surprised us in Postgres-schema multitenancy
You can implement multitenancy in various ways. In one of our projects we went for schema-based multitenancy, where each tenant has its own PostgreSQL schema - i.e. its own namespaced set of tables. I like this particular feature of Postgres, but one has to admit it introduces a little bit of complexity - after all it’s not a conventional feature everyone uses.
The thing is that complexity compounds. One unconventional feature is not a big deal, but if there’s more of them, interesting things start to happen. Here are some of the things that surprised us when we were implementing schema-based multitenancy.