Moving roles to postgres

I was watching this conference and I was wondering if that approach is really more scalable. In that conference the guy shows an approach where you migrate all logic related to roles and the data that can be accessed to postgres. In my opinion the downsides are:

  1. Harder to migrate new changes on an existing database.
  2. Writing raw queries in SQL.
  3. Debugging queries(since I didn’t try it, I’m not sure if ecto logs the trasnaction correctly)
  4. Possible performance degradation.

However there are some big advantages also:

  1. Move all the logic related to roles to postgres.
  2. Clear readable code without convoluted queries.

So my question is: would you move your roles logic to postgres, and if no why?

1 Like

:wave:

Might be somewhat relevant:

4 Likes

I just found this talk and it blew my mind. I wasn’t even aware that Postgres had all of these features (newbie here).

So the first thing he says is that hopefully you create a role for your application, which most people don’t. I’ve been using the postgres default, as he mentioned. What is the issue with that, though? And what would be a better approach to take?