Update to gitlab 16.6.2-1 (main: -- add_column(:catalog_resources, :name, :varchar, {:null=>true}))

I’m tired every second update have to spend several hours to make this thing working again…

This one manage to fix for gitlabhq_production gitlabhq_production_ci

WARNING:  database "gitlabhq_production" has a collation version mismatch
DETAIL:  The database was created using collation version 2.37, but the operating system provides version 2.38.
HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE gitlabhq_production REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.

How to fix below issue?

main: == [advisory_lock_connection] object_id: 119320, pg_backend_pid: 30148
main: == 20231019180421 AddNameDescriptionToCatalogResources: migrating =============
main: -- add_column(:catalog_resources, :name, :varchar, {:null=>true})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

PG::DuplicateColumn: ERROR:  column "name" of relation "catalog_resources" already exists
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/marginalia-1.11.1/lib/marginalia.rb:71:in `execute_with_marginalia'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:628:in `add_column'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/schema_statements.rb:398:in `add_column'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:965:in `block in method_missing'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:935:in `block in say_with_time'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:935:in `say_with_time'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:954:in `method_missing'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration/compatibility.rb:56:in `add_column'
/usr/share/webapps/gitlab/db/migrate/20231019180421_add_name_description_to_catalog_resources.rb:11:in `up'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:908:in `public_send'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:908:in `exec_migration'
/usr/share/webapps/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:33:in `block in exec_migration'
/usr/share/webapps/gitlab/lib/gitlab/database/query_analyzer.rb:37:in `within'
/usr/share/webapps/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:30:in `exec_migration'
/usr/share/webapps/gitlab/lib/gitlab/database/migration_helpers/automatic_lock_writes_on_tables.rb:21:in `exec_migration'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:889:in `block (2 levels) in migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:888:in `block in migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:887:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1095:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1409:in `block in execute_migration_in_transaction'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1462:in `ddl_transaction'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/lock_retry_mixin.rb:36:in `ddl_transaction'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1408:in `execute_migration_in_transaction'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/runner_backoff/active_record_mixin.rb:21:in `execute_migration_in_transaction'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1382:in `each'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1382:in `migrate_without_lock'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1331:in `block in migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1481:in `block in with_advisory_lock'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/pg_backend_pid.rb:15:in `block in with_advisory_lock_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1496:in `with_advisory_lock_connection'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/pg_backend_pid.rb:12:in `with_advisory_lock_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1477:in `with_advisory_lock'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1331:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1166:in `up'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1141:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:100:in `block (4 levels) in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:98:in `each'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:98:in `block (3 levels) in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:97:in `each'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:97:in `block (2 levels) in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/sentry-ruby-5.8.0/lib/sentry/rake.rb:26:in `execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:in `load'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:23:in `run'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli.rb:492:in `exec'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli.rb:34:in `dispatch'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli.rb:28:in `start'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/exe/bundle:37:in `block in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/exe/bundle:29:in `<top (required)>'
/usr/bin/bundle:25:in `load'
/usr/bin/bundle:25:in `<main>'

Caused by:
ActiveRecord::StatementInvalid: PG::DuplicateColumn: ERROR:  column "name" of relation "catalog_resources" already exists
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/marginalia-1.11.1/lib/marginalia.rb:71:in `execute_with_marginalia'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:628:in `add_column'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/schema_statements.rb:398:in `add_column'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:965:in `block in method_missing'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:935:in `block in say_with_time'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:935:in `say_with_time'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:954:in `method_missing'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration/compatibility.rb:56:in `add_column'
/usr/share/webapps/gitlab/db/migrate/20231019180421_add_name_description_to_catalog_resources.rb:11:in `up'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:908:in `public_send'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:908:in `exec_migration'
/usr/share/webapps/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:33:in `block in exec_migration'
/usr/share/webapps/gitlab/lib/gitlab/database/query_analyzer.rb:37:in `within'
/usr/share/webapps/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:30:in `exec_migration'
/usr/share/webapps/gitlab/lib/gitlab/database/migration_helpers/automatic_lock_writes_on_tables.rb:21:in `exec_migration'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:889:in `block (2 levels) in migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:888:in `block in migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:887:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1095:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1409:in `block in execute_migration_in_transaction'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1462:in `ddl_transaction'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/lock_retry_mixin.rb:36:in `ddl_transaction'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1408:in `execute_migration_in_transaction'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/runner_backoff/active_record_mixin.rb:21:in `execute_migration_in_transaction'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1382:in `each'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1382:in `migrate_without_lock'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1331:in `block in migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1481:in `block in with_advisory_lock'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/pg_backend_pid.rb:15:in `block in with_advisory_lock_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1496:in `with_advisory_lock_connection'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/pg_backend_pid.rb:12:in `with_advisory_lock_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1477:in `with_advisory_lock'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1331:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1166:in `up'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1141:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:100:in `block (4 levels) in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:98:in `each'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:98:in `block (3 levels) in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:97:in `each'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:97:in `block (2 levels) in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/sentry-ruby-5.8.0/lib/sentry/rake.rb:26:in `execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:in `load'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:23:in `run'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli.rb:492:in `exec'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli.rb:34:in `dispatch'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli.rb:28:in `start'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/exe/bundle:37:in `block in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/exe/bundle:29:in `<top (required)>'
/usr/bin/bundle:25:in `load'
/usr/bin/bundle:25:in `<main>'

Caused by:
PG::DuplicateColumn: ERROR:  column "name" of relation "catalog_resources" already exists
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/marginalia-1.11.1/lib/marginalia.rb:71:in `execute_with_marginalia'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:628:in `add_column'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/schema_statements.rb:398:in `add_column'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:965:in `block in method_missing'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:935:in `block in say_with_time'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:935:in `say_with_time'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:954:in `method_missing'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration/compatibility.rb:56:in `add_column'
/usr/share/webapps/gitlab/db/migrate/20231019180421_add_name_description_to_catalog_resources.rb:11:in `up'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:908:in `public_send'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:908:in `exec_migration'
/usr/share/webapps/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:33:in `block in exec_migration'
/usr/share/webapps/gitlab/lib/gitlab/database/query_analyzer.rb:37:in `within'
/usr/share/webapps/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:30:in `exec_migration'
/usr/share/webapps/gitlab/lib/gitlab/database/migration_helpers/automatic_lock_writes_on_tables.rb:21:in `exec_migration'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:889:in `block (2 levels) in migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:888:in `block in migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:887:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1095:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1409:in `block in execute_migration_in_transaction'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1462:in `ddl_transaction'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/lock_retry_mixin.rb:36:in `ddl_transaction'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1408:in `execute_migration_in_transaction'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/runner_backoff/active_record_mixin.rb:21:in `execute_migration_in_transaction'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1382:in `each'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1382:in `migrate_without_lock'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1331:in `block in migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1481:in `block in with_advisory_lock'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/pg_backend_pid.rb:15:in `block in with_advisory_lock_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1496:in `with_advisory_lock_connection'
/usr/share/webapps/gitlab/lib/gitlab/database/migrations/pg_backend_pid.rb:12:in `with_advisory_lock_connection'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1477:in `with_advisory_lock'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1331:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1166:in `up'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1141:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:100:in `block (4 levels) in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:98:in `each'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:98:in `block (3 levels) in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:97:in `each'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:97:in `block (2 levels) in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/sentry-ruby-5.8.0/lib/sentry/rake.rb:26:in `execute'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:in `load'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:23:in `run'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli.rb:492:in `exec'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli.rb:34:in `dispatch'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/cli.rb:28:in `start'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/exe/bundle:37:in `block in <top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/share/webapps/gitlab/vendor/bundle/ruby/3.0.0/gems/bundler-2.4.21/exe/bundle:29:in `<top (required)>'
/usr/bin/bundle:25:in `load'
/usr/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)