Conversation
Notices
-
Sanae Respecter (frogmaiden@shrine.moe)'s status on Wednesday, 26-Apr-2023 07:31:28 JST Sanae Respecter @mint off the top of your head how simple is pgupgrade? I want to get this database from 14 to 15 and preferably not fuck it up. I backed up the data beforehand of course -
(mint@ryona.agency)'s status on Wednesday, 26-Apr-2023 07:31:27 JST @frogmaiden Simple enough, but you have to have both versions installed at the time of upgrade, then it'll create a new copy of a cluster so you mght want to delete the older one after it's done. -
(mint@ryona.agency)'s status on Wednesday, 26-Apr-2023 07:35:12 JST @frogmaiden It says DB with that name does not exist, check your configs in case you've changed them recently. -
Sanae Respecter (frogmaiden@shrine.moe)'s status on Wednesday, 26-Apr-2023 07:35:13 JST Sanae Respecter @mint Understood. On a related note, I just ran an update for pleroma (haven’t messed with postgres yet) and got this spat out at me:
17:31:03.213 [error] Postgrex.Protocol (#PID<0.17775.0>) failed to connect: ** (Postgrex.Error) FATAL 3D000 (invalid_catalog_name) database "pleroma_dev" does not exist 17:31:03.213 [error] Postgrex.Protocol (#PID<0.17776.0>) failed to connect: ** (Postgrex.Error) FATAL 3D000 (invalid_catalog_name) database "pleroma_dev" does not exist 17:31:04.718 [error] Postgrex.Protocol (#PID<0.17775.0>) failed to connect: ** (Postgrex.Error) FATAL 3D000 (invalid_catalog_name) database "pleroma_dev" does not exist 17:31:05.581 [error] Postgrex.Protocol (#PID<0.17776.0>) failed to connect: ** (Postgrex.Error) FATAL 3D000 (invalid_catalog_name) database "pleroma_dev" does not exist 17:31:06.097 [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 and/or repository for managing migrations: config :pleroma, Pleroma.Repo, migration_source: "some_other_table_for_schema_migrations", migration_repo: AnotherRepoForSchemaMigrations The full error report is shown below. ** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2974ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by: 1. Ensuring your database is available and that you can connect to it 2. Tracking down slow queries and making sure they are running fast enough 3. Increasing the pool_size (although this increases resource consumption) 4. Allowing requests to wait longer by increasing :queue_target and :queue_interval See DBConnection.start_link/2 for more information (ecto_sql 3.9.2) lib/ecto/adapters/sql.ex:913: Ecto.Adapters.SQL.raise_sql_call_error/1 (elixir 1.14.2) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2 (ecto_sql 3.9.2) lib/ecto/adapters/sql.ex:1005: Ecto.Adapters.SQL.execute_ddl/4 (ecto_sql 3.9.2) lib/ecto/migrator.ex:677: Ecto.Migrator.verbose_schema_migration/3 (ecto_sql 3.9.2) lib/ecto/migrator.ex:491: Ecto.Migrator.lock_for_migrations/4 (ecto_sql 3.9.2) lib/ecto/migrator.ex:403: Ecto.Migrator.run/4 (ecto_sql 3.9.2) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3 (pleroma 2.5.51-102-g3867b52a-develop+dev) lib/mix/tasks/pleroma/ecto/migrate.ex:63: Mix.Tasks.Pleroma.Ecto.Migrate.run/1 (mix 1.14.2) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4 (mix 1.14.2) lib/mix/task.ex:479: Mix.Task.run_alias/6 (mix 1.14.2) lib/mix/cli.ex:84: Mix.CLI.run_task/2 (elixir 1.14.2) lib/code.ex:1260: Code.require_file/2``` -
Sanae Respecter (frogmaiden@shrine.moe)'s status on Wednesday, 26-Apr-2023 07:36:41 JST Sanae Respecter @mint Haven't changed any of them recently and oh dear lord I just realized I forgot to set MIX_ENV to prod likes this. -
(mint@ryona.agency)'s status on Wednesday, 26-Apr-2023 07:40:14 JST @frogmaiden That's why I use OTP builds. Less bullshit like this. Check if the MIX_ENV is set correctly, if you're running it through sudo, it doesn't pass variables by default, so do sudo --user=pleroma env MIX_ENV=prod <command>, for example. -
Sanae Respecter (frogmaiden@shrine.moe)'s status on Wednesday, 26-Apr-2023 07:40:15 JST Sanae Respecter @mint Re-ran mix deps.get and ecto.migrate and am still getting the error
fuuuuuck -
Sanae Respecter (frogmaiden@shrine.moe)'s status on Wednesday, 26-Apr-2023 08:14:56 JST Sanae Respecter @mint successfully compiled! To avoid this in the future, I'll put ```export MIX_ENV=prod``` to the pleroma user's .bashrc or .profile or whaever it is likes this.
-