mastodon@work3:~/live$ RAILS_ENV=production bin/tootctl maintenance fix-duplicates Your version of the database schema is more recent than this script, this may cause unexpected errors. Continue anyway? (Yes/No) Yes This task will take a long time to run and is potentially destructive. Please make sure to stop Mastodon and have a backup. Continue? (Yes/No) Yes Deduplicating user records… Restoring users indexes… /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:49:in `exec': PG::InsufficientPrivilege: ERROR: permission denied for schema public (ActiveRecord::StatementInvalid) from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:49:in `block (2 levels) in execute' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block in execute' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/notifications/instrumenter.rb:24:in `instrument' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `execute' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:448:in `add_index' from /home/mastodon/live/lib/mastodon/maintenance_cli.rb:276:in `deduplicate_users!' from /home/mastodon/live/lib/mastodon/maintenance_cli.rb:169:in `fix_duplicates' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:116:in `invoke' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor.rb:243:in `block in subcommand' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start' from bin/tootctl:9:in `block in
' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/chewy-7.2.4/lib/chewy/strategy.rb:57:in `wrap' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/chewy-7.2.4/lib/chewy.rb:154:in `strategy' from bin/tootctl:8:in `
' /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:49:in `exec': ERROR: permission denied for schema public (PG::InsufficientPrivilege) from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:49:in `block (2 levels) in execute' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block in execute' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/notifications/instrumenter.rb:24:in `instrument' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `execute' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:448:in `add_index' from /home/mastodon/live/lib/mastodon/maintenance_cli.rb:276:in `deduplicate_users!' from /home/mastodon/live/lib/mastodon/maintenance_cli.rb:169:in `fix_duplicates' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:116:in `invoke' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor.rb:243:in `block in subcommand' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start' from bin/tootctl:9:in `block in
' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/chewy-7.2.4/lib/chewy/strategy.rb:57:in `wrap' from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/chewy-7.2.4/lib/chewy.rb:154:in `strategy' from bin/tootctl:8:in `
'