postgrex issue: ERROR: there are multiple default operator classes for data type smallint
Environment
-
Installation type (OTP or From Source): source
-
Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): Stable
-
Elixir version (
elixir -v
for from source installations, N/A for OTP): Erlang/OTP 23 [erts-11.1.7] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] Elixir 1.11.2 (compiled with Erlang/OTP 23) -
Operating system:Ubuntu 20.04
-
PostgreSQL version (
psql -V
):psql -V psql (PostgreSQL) 10.16 (Ubuntu 10.16-0ubuntu0.18.04.1)
Bug description
16:47:19.714 [error] Postgrex.Protocol (#PID<0.531.0>) failed to connect: ** (Postgrex.Error) ERROR 42710 (duplicate_object) there are multiple default operator classes for data type smallint
16:47:19.714 [error] Postgrex.Protocol (#PID<0.530.0>) failed to connect: ** (Postgrex.Error) ERROR 42710 (duplicate_object) there are multiple default operator classes for data type smallint
16:47:21.708 [error] Postgrex.Protocol (#PID<0.530.0>) failed to connect: ** (Postgrex.Error) ERROR 42710 (duplicate_object) there are multiple default operator classes for data type smallint
16:47:22.346 [error] Postgrex.Protocol (#PID<0.531.0>) failed to connect: ** (Postgrex.Error) ERROR 42710 (duplicate_object) there are multiple default operator classes for data type smallint
16:47:22.669 [error] Could not create schema migrations table. This error usually happens due to the following:
* The database does not exist
* The "schema_migrations" table, which Ecto uses for managing
migrations, was defined by another library
* There is a deadlock while migrating (such as using concurrent
indexes with a migration_lock)
To fix the first issue, run "mix ecto.create".
To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table for managing migrations:
config :pleroma, Pleroma.Repo,
migration_source: "some_other_table_for_schema_migrations"
The full error report is shown below.
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2989ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:
1. Tracking down slow queries and making sure they are running fast enough
2. Increasing the pool_size (albeit it increases resource consumption)
3. Allowing requests to wait longer by increasing :queue_target and :queue_interval
See DBConnection.start_link/2 for more information
(ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:593: Ecto.Adapters.SQL.raise_sql_call_error/1
(elixir 1.11.2) lib/enum.ex:1399: Enum."-map/2-lists^map/1-0-"/2
(ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:686: Ecto.Adapters.SQL.execute_ddl/4
(ecto_sql 3.4.5) lib/ecto/migrator.ex:641: Ecto.Migrator.verbose_schema_migration/3
(ecto_sql 3.4.5) lib/ecto/migrator.ex:484: Ecto.Migrator.lock_for_migrations/4
(ecto_sql 3.4.5) lib/ecto/migrator.ex:406: Ecto.Migrator.run/4
(ecto_sql 3.4.5) lib/ecto/migrator.ex:142: Ecto.Migrator.with_repo/3
(pleroma 2.3.0-1-gb221d77a) lib/mix/tasks/pleroma/ecto/migrate.ex:63: Mix.Tasks.Pleroma.Ecto.Migrate.run/1
Started happening out of nowhere and just kept happening after stoping and attempting to update and migrate
postgresql 13 and ubuntu server lts
tried rebuilding and such data base is there still gives smallint error when trying to vacuum
pleroma=# VACUUM FULL ANALYZE;
NOTICE: word is too long to be indexed
DETAIL: Words longer than 2047 characters are ignored.
ERROR: there are multiple default operator classes for data type smallint
pleroma=#
Edited by xmanifesto