IndexCorrupted error when running tootctl preview_cards remove

Hi there, I ran this RAILS_ENV=production bundle exec bin/tootctl preview_cards remove --days 180 and while the command did its work, I am also seeing the following errors growing longer. May I know how exactly to run the REINDEX?

: SELECT  1 AS one FROM "preview_cards" WHERE "preview_cards"."url" = $1 AND "preview_cards"."id" != $2 LIMIT $3
Error processing 502344: PG::IndexCorrupted: ERROR:  index "index_preview_cards_on_url" contains unexpected zero page at block 5585
HINT:  Please REINDEX it.
: SELECT  1 AS one FROM "preview_cards" WHERE "preview_cards"."url" = $1 AND "preview_cards"."id" != $2 LIMIT $3
Error processing 502618: PG::IndexCorrupted: ERROR:  index "index_preview_cards_on_url" contains unexpected zero page at block 5585
HINT:  Please REINDEX it.
: SELECT  1 AS one FROM "preview_cards" WHERE "preview_cards"."url" = $1 AND "preview_cards"."id" != $2 LIMIT $3
Error processing 502984: PG::IndexCorrupted: ERROR:  index "index_preview_cards_on_url" contains unexpected zero page at block 5594
HINT:  Please REINDEX it.
: SELECT  1 AS one FROM "preview_cards" WHERE "preview_cards"."url" = $1 AND "preview_cards"."id" != $2 LIMIT $3
Error processing 610620: PG::IndexCorrupted: ERROR:  index "index_preview_cards_on_url" contains unexpected zero page at block 5617
HINT:  Please REINDEX it.
: UPDATE "preview_cards" SET "image_file_name" = $1, "image_file_size" = $2, "image_content_type" = $3, "image_updated_at" = $4, "updated_at" = $5 WHERE "preview_cards"."id" = $6

Appreciate assistance on this. Cheers!

You could shut down the instance and connect directly to the database and issue the PostgreSQL REINDEX command: PostgreSQL: Documentation: 11: REINDEX

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.