مرحبًا،
واجه تطبيق 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، لذا أرجو مساعدتي.