mastodon@work3:~/live$ RAILS_ENV=production bin/tootctl maintenance fix-duplicates 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… Removing duplicate account domain blocks… Restoring account domain blocks indexes… Removing duplicate account identity proofs… Restoring announcement_reactions indexes… Deduplicating conversations… Restoring conversations indexes… Deduplicating custom_emojis… Restoring custom_emojis indexes… Deduplicating custom_emoji_categories… Restoring custom_emoji_categories indexes… Deduplicating domain_allows… Restoring domain_allows indexes… Deduplicating domain_allows… Restoring domain_blocks indexes… Deduplicating unavailable_domains… Restoring domain_allows indexes… Deduplicating email_domain_blocks… Restoring email_domain_blocks indexes… Deduplicating media_attachments… Restoring media_attachments indexes… Deduplicating preview_cards… Restoring preview_cards indexes… /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec': PG::ProgramLimitExceeded: ERROR: index row size 2712 exceeds btree version 4 maximum 2704 for index "index_preview_cards_on_url" (ActiveRecord::StatementInvalid) DETAIL: Index row references tuple (214815,16) in relation "preview_cards". HINT: Values larger than 1/3 of a buffer page cannot be indexed. Consider a function index of an MD5 hash of the value, or use full text indexing. from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/schema_statements.rb:448:in `add_index' from /home/mastodon/live/lib/mastodon/cli/maintenance.rb:477:in `deduplicate_preview_cards!' from /home/mastodon/live/lib/mastodon/cli/maintenance.rb:169:in `fix_duplicates' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:116:in `invoke' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:243:in `block in subcommand' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' from /home/mastodon/live/vendor/bundle/ruby/3.2.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.2.0/gems/chewy-7.3.4/lib/chewy/strategy.rb:60:in `wrap' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/chewy-7.3.4/lib/chewy.rb:154:in `strategy' from bin/tootctl:8:in `
' /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec': ERROR: index row size 2712 exceeds btree version 4 maximum 2704 for index "index_preview_cards_on_url" (PG::ProgramLimitExceeded) DETAIL: Index row references tuple (214815,16) in relation "preview_cards". HINT: Values larger than 1/3 of a buffer page cannot be indexed. Consider a function index of an MD5 hash of the value, or use full text indexing. from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql/schema_statements.rb:448:in `add_index' from /home/mastodon/live/lib/mastodon/cli/maintenance.rb:477:in `deduplicate_preview_cards!' from /home/mastodon/live/lib/mastodon/cli/maintenance.rb:169:in `fix_duplicates' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:116:in `invoke' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:243:in `block in subcommand' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' from /home/mastodon/live/vendor/bundle/ruby/3.2.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.2.0/gems/chewy-7.3.4/lib/chewy/strategy.rb:60:in `wrap' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/chewy-7.3.4/lib/chewy.rb:154:in `strategy' from bin/tootctl:8:in `
'