Closed runningwa closed 22 hours ago
Hey @runningwa
The _supabase database is a new addition to separate the internal Supabase tables (like analytics) from user data. Did you upgrade your self-hosted stack recently ?
If you’re setting up fresh, it works out of the box. But for upgrades, some manual steps are needed since the database is already initialized. This comment explains the steps.
We know the upgrade process isn’t ideal right now, and we’re looking into ways to make it smoother for self-hosted users—thanks for pointing it out! Let me know if you run into any issues, and I’ll do my best to help.
I couldn't start pooler in a fresh new environment either.
@avallete Thanks for your reply. I tried a fresh installation, but still had this problem. The supabase-pooler container kept restarting. The database should be brand new, with no old data. The logs also had the above problem. I used the latest version of the file. My operating system is Ubuntu 24.0.4, and Docker version is 24.0.7.
I got the error logs for pooler service :
se-pooler | * The database does not exist
supabase-pooler | * The "schema_migrations" table, which Ecto uses for managing
supabase-pooler | migrations, was defined by another library
supabase-pooler | * There is a deadlock while migrating (such as using concurrent
supabase-pooler | indexes with a migration_lock)
supabase-pooler |
supabase-pooler | To fix the first issue, run "mix ecto.create" for the desired MIX_ENV.
supabase-pooler |
supabase-pooler | To address the second, you can run "mix ecto.drop" followed by
supabase-pooler | "mix ecto.create", both for the desired MIX_ENV. Alternatively you may
supabase-pooler | configure Ecto to use another table and/or repository for managing
supabase-pooler | migrations:
supabase-pooler |
supabase-pooler | config :supavisor, Supavisor.Repo,
supabase-pooler | migration_source: "some_other_table_for_schema_migrations",
supabase-pooler | migration_repo: AnotherRepoForSchemaMigrations
supabase-pooler |
supabase-pooler | The full error report is shown below.
supabase-pooler |
supabase-pooler | ** (Postgrex.Error) ERROR 42501 (insufficient_privilege) permission denied for schema _supavisor
supabase-pooler | (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1047: Ecto.Adapters.SQL.raise_sql_call_error/1
supabase-pooler | (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
supabase-pooler | (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1154: Ecto.Adapters.SQL.execute_ddl/4
supabase-pooler | (ecto_sql 3.10.2) lib/ecto/migrator.ex:756: Ecto.Migrator.verbose_schema_migration/3
supabase-pooler | (ecto_sql 3.10.2) lib/ecto/migrator.ex:564: Ecto.Migrator.lock_for_migrations/4
supabase-pooler | (ecto_sql 3.10.2) lib/ecto/migrator.ex:433: Ecto.Migrator.run/4
supabase-pooler | (ecto_sql 3.10.2) lib/ecto/migrator.ex:170: Ecto.Migrator.with_repo/3
supabase-pooler | nofile:1: (file)
Hey there, it seems that the issue is related to the role to use after a PG image upgrade. The pooler should connect as "supabase_admin". Like so:
DATABASE_URL=ecto://supabase_admin:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/_supabase
A fix is on its way here: https://github.com/supabase/supabase/pull/30674
Hey there, it seems that the issue is related to the role to use after a PG image upgrade. The pooler should connect as "supabase_admin". Like so:
DATABASE_URL=ecto://supabase_admin:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/_supabase
A fix is on its way here: supabase/supabase#30674
This works tysm!
Hey there, it seems that the issue is related to the role to use after a PG image upgrade. The pooler should connect as "supabase_admin". Like so:
DATABASE_URL=ecto://supabase_admin:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/_supabase
A fix is on its way here: supabase/supabase#30674
Edit docker-compose.yaml .This works tysm!
Edit docker-compose.yaml Modify the configuration of supabase-pooler: DATABASE_URL=ecto://supabase_admin:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/_supabase
Describe the bug The Supavisor pooler in my self-hosted Supabase setup keeps restarting . I check log ,it shows this error messages:
To Reproduce Steps to reproduce the behavior:
Expected behavior The Supavisor pooler should start and I have no idea about this problem
Screenshots
Additional context Any help or guidance on troubleshooting this error further would be appreciated. Thank you!