こんにちは、
Discourse のバックアップ実行時に「stylesheet_cache」テーブルでエラーが発生しました。
ログには以下のエラーが表示されています:
[2020-05-30 06:55:50] pg_dump: dumping contents of table "public.stylesheet_cache"
[2020-05-30 06:56:06] pg_dump: error: Dumping the contents of table "stylesheet_cache" failed: PQgetResult() failed.
[2020-05-30 06:56:06] pg_dump: error: Error message from server: ERROR: unexpected chunk size 1996 (expected 1315) in final chunk 44 for toast value 35175 in pg_toast_22999
[2020-05-30 06:56:07] pg_dump: error: The command was: COPY public.stylesheet_cache (id, target, digest, content, created_at, updated_at, theme_id, source_map) TO stdout;
[2020-05-30 06:56:07] Unpausing sidekiq...
[2020-05-30 06:56:07] EXCEPTION: pg_dump failed
アプリにログインしてこのテーブルの再インデックスを試みましたが、CLI では完了しませんでした:
discourse=# REINDEX TABLE public.stylesheet_cache;
ERROR: could not create unique index "stylesheet_cache_pkey"
DETAIL: Key (id)=(11604) is duplicated.
PostgreSQL の初心者ですので、データベース上のこのエラーを解消する方法をご教示ください。よろしくお願いいたします。