Corys
I got a new video up on doing multi tenancy in phoenix 1.3 using Apartmentex.
Lemme know if any questions. ![]()
Trending in Screencasts
A new screencast on moving a blocking HTTP fetch into an Oban job. Part 1 of 2. Screencast + full walkthrough:
New
A new screencast on live LiveView updates with PubSub, the Oban Web dashboard, and smarter retries. Part 2 of 2. Screencast + full walkth...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #ai
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
marciol
Hi @Corys, great post. I have been working with this kind of approach for some time, but after read a blog post by Influitive, the creators of gem Apartment, which inspired the Apartmentex Hex Package, I started to think if this is the best approach.
After some research I found a new feature in postgreSQL that could be an alternative, Row Security Level, and a great post by 2ndQuadrant
Let us know what do you think.
OvermindDL1
Now wha? PostgreSQL finally added RSL? I’ve been wanting that for years! Whoo hoo! I like its implementation!
brightball
It’s a good approach, but one of the big perks of the apartment approach with schema per tenant is total separation of indexes across all tables in addition to just the isolation aspect. The approach of schema per tenant also makes it a lot easier for you to scale horizontally by tenant, or even breaking things into entirely regionalized zones. When the tenant doesn’t need access to other tenant info it’s a big perk.
You don’t necessarily need Apartment to do it, but the approach has a lot of benefits.
marciol
Yes, in Phoenix is straightforward to achieve this without the help of any package.
andre1sk
It’s in since 9.5