Gitlab-ce upgrade issue while upgrading from 14.0.12 to 14.3.6 below error is coming and container is not coming up

This is Nithish Kumar G working as a Devops Engineer in Metricstream company,we are using a gitlab community edition(13.12.15 version) , We are facing issue while upgrading gitlab-ce edition , we are following the upgrade path mentioned in the document as 13.12.15 → 14.0.12 → 14.3.6 , we successfully upgraded to 14.0.12 and container was up and running and background migrations completed successfully after sometime and then we tried to upgrade to 14.3.6 the container was not coming up and continously restarting in a loop, when we go through the logs found some below error

rails_migration[gitlab-rails] (gitlab::database_migrations line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: bash[migrate gitlab-rails database] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/rails_migration.rb line 16) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’

---- Begin output of “bash” “/tmp/chef-script20221207-31-1820bvw” ----

STDOUT: rake aborted!

StandardError: An error has occurred, this and all later migrations canceled:

PG::InsufficientPrivilege: ERROR: must be owner of table schema_migrations

/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20210616134905_add_timestamp_to_schema_migration.rb:6:in `up’

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database.rb:260:in `block in transaction’

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database.rb:259:in `transaction’

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migrations/lock_retry_mixin.rb:31:in `ddl_transaction’

/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:61:in `block (3 levels) in <top (required)>’

/opt/gitlab/embedded/bin/bundle:23:in `load’

/opt/gitlab/embedded/bin/bundle:23:in `’

Caused by:

ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: must be owner of table schema_migrations

/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20210616134905_add_timestamp_to_schema_migration.rb:6:in `up’

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database.rb:260:in `block in transaction’

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database.rb:259:in `transaction’

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migrations/lock_retry_mixin.rb:31:in `ddl_transaction’

/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:61:in `block (3 levels) in <top (required)>’

/opt/gitlab/embedded/bin/bundle:23:in `load’

/opt/gitlab/embedded/bin/bundle:23:in `’

Caused by:

PG::InsufficientPrivilege: ERROR: must be owner of table schema_migrations

/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20210616134905_add_timestamp_to_schema_migration.rb:6:in `up’

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database.rb:260:in `block in transaction’

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database.rb:259:in `transaction’

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migrations/lock_retry_mixin.rb:31:in `ddl_transaction’

/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:61:in `block (3 levels) in <top (required)>’

/opt/gitlab/embedded/bin/bundle:23:in `load’

/opt/gitlab/embedded/bin/bundle:23:in `’

Tasks: TOP => db:migrate

(See full trace by running task with --trace)

== 20210616134905 AddTimestampToSchemaMigration: migrating ====================

– add_column(:schema_migrations, :finished_at, :timestamptz)

STDERR:

---- End output of “bash” “/tmp/chef-script20221207-31-1820bvw” ----

Ran “bash” “/tmp/chef-script20221207-31-1820bvw” returned 1

I tried upgrading gitlab-ce from 13.12.15 to 14.0.12 and it is successfull and container is coming up but when i tried to upgrade from 14.0.12 to 14.3.6 after completing background migrations in 14.0.12 it is not coming up and container restarting in loop.