Replies: 3 comments
-
I suspect the problem is that your teslamate user is not a superuser. The "Manual Install" instructions say that this is required during the migration step. In the standard "Docker Install" instructions, the teslamate user is the superuser. |
Beta Was this translation helpful? Give feedback.
-
I would guess it is superuser: teslamate | Create role, Create DB +| {rds_superuser} I was also able with this user to change the ownership of the respective function. |
Beta Was this translation helpful? Give feedback.
-
According to the docs, the superuser attribute is never inherited (see https://www.postgresql.org/docs/current/role-membership.html). I don't know why a new function wasn't created, but I suppose it would have been more work to fix all of the users. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
During deployment of teslamate Docker app in AWS ECS/AWS RDS postgresql as DB backend service, I retrieved the error:
** (Postgrex.Error) ERROR 42501 (insufficient_privilege) must be owner of function ll_to_earth when SQL
"CREATE OR REPLACE FUNCTION public.ll_to_earth(float8, float8)\nRETURNS public.earth\nLANGUAGE SQL\nIMMUTABLE STRICT\nPARALLEL SAFE\nAS 'SELECT public.cube(public.cube(public.cube(public.earth()*cos(radians($1))*cos(radians($2))),public.earth()*cos(radians($1))*sin(radians($2))),public.earth()*sin(radians($1)))::public.earth';\n"
is executed
This function seems to be owned by standard user rdsadmin, and not by the user teslamate is configured in.
I changed the owner of the function on postgres manually, after that SQL worked.
Expected behavior
Initial installation process should runs smooth without intervention.
Relevant entries from the logs
Environment
Beta Was this translation helpful? Give feedback.
All reactions