Postgres failing with upgrading from 11.6 to 11.14

I’ve also seen this, but it seems to be related to moving to the cimg images so that I could use Ruby 3.1 in my case. I’ve tried reverting to the old-style postgres image and that doesn’t fix it, so it seems to be an issue with the ruby runner. Here’s the offending commit:

Step output:

#!/bin/bash -eo pipefail
bin/rake db:setup --trace

Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
** Invoke db:setup (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:create
Created database 'lifework_test'
** Invoke environment 
** Invoke db:schema:load (first_time)
** Invoke db:load_config 
** Invoke db:check_protected_environments (first_time)
** Invoke db:load_config 
** Execute db:check_protected_environments
** Execute db:schema:load
WARNING: terminal is not fully functional
-  (press RETURN)a set_config 
------------
 
(1 row)

(END)a(END)rake aborted!
Interrupt: 
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/postgresql_database_tasks.rb:111:in `system'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/postgresql_database_tasks.rb:111:in `run_cmd'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/postgresql_database_tasks.rb:86:in `structure_load'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/database_tasks.rb:314:in `structure_load'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/database_tasks.rb:328:in `load_schema'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/database_tasks.rb:435:in `block in load_schema_current'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/database_tasks.rb:506:in `block (2 levels) in each_current_configuration'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/database_tasks.rb:503:in `each'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/database_tasks.rb:503:in `block in each_current_configuration'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/database_tasks.rb:502:in `each'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/database_tasks.rb:502:in `each_current_configuration'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/tasks/database_tasks.rb:434:in `load_schema_current'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.4.6/lib/active_record/railties/databases.rake:462:in `block (3 levels) in <top (required)>'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/bugsnag-6.24.2/lib/bugsnag/integrations/rake.rb:20:in `execute'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/circleci/lw-web/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
bin/rake:4:in `<main>'
Tasks: TOP => db:setup => db:schema:load

Too long with no output (exceeded 10m0s): context deadline exceeded

I also tried following this suggestion to add TERM=xterm but that only gets rid of “WARNING: terminal is not fully functional” - not the timeout