Ciao,
il nostro Discourse ha riscontrato un errore sulla tabella “stylesheet_cache” durante l’esecuzione del backup.
Il log mostra l’errore come:
[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
Ho provato ad accedere all’app e a reindicizzare questa tabella, ma non è andato a buon fine. La CLI ha mostrato:
discourse=# REINDEX TABLE public.stylesheet_cache;
ERROR: could not create unique index "stylesheet_cache_pkey"
DETAIL: Key (id)=(11604) is duplicated.
Ti chiedo gentilmente di suggerire cosa fare per risolvere questo errore nel database, poiché sono nuovo di PostgreSQL, quindi per favore aiutami.