Since today I'm getting this error message. In Error-Log I can see following error message:
2019-04-23 10:04:25,048 6344 ERROR myDB odoo.sql_db: bad query: b'SELECT "ir_module_module"."id" as "id","ir_module_module"."author" as "author","ir_module_module"."state" as "state","ir_module_module"."application" as "application","ir_module_module"."url" as "url","ir_module_module"."license" as "license","ir_module_module"."maintainer" as "maintainer","ir_module_module"."category_id" as "category_id","ir_module_module"."icon" as "icon","ir_module_module"."menus_by_module" as "menus_by_module","ir_module_module"."website" as "website","ir_module_module"."create_date" as "create_date","ir_module_module"."name" as "name","ir_module_module"."sequence" as "sequence","ir_module_module"."reports_by_module" as "reports_by_module","ir_module_module"."write_date" as "write_date","ir_module_module"."description" as "description","ir_module_module"."shortdesc" as "shortdesc","ir_module_module"."auto_install" as "auto_install","ir_module_module"."views_by_module" as "views_by_module","ir_module_module"."latest_version" as "latest_version","ir_module_module"."contributors" as "contributors","ir_module_module"."create_uid" as "create_uid","ir_module_module"."summary" as "summary","ir_module_module"."demo" as "demo","ir_module_module"."published_version" as "published_version","ir_module_module"."write_uid" as "write_uid" FROM "ir_module_module" WHERE "ir_module_module".id IN (185, 129, 1, 258, 3, 260, 4, 9, 142, 273, 148, 278, 279, 151, 30, 160, 33, 164, 292, 294, 39, 45, 175, 49, 50, 179, 53, 189, 62, 61, 67, 72, 73, 201, 202, 200, 80, 209, 215, 99, 100, 104, 245, 125, 126, 255)'
ERROR: index "pg_toast_41381_index" contains unexpected zero page at block 1
HINT: Please REINDEX it.
When I try to index "pg_toast_41381_index" postgres tells me that there is no such index
Thank you for your help
Got the wright solution :D
Go to the command line (pgAdmin). Choose the affected DB and fire out following command:
reindex index pg_toast.pg_toast_41381_index;
It could be that in other case another Number is affected, but that's the wright command. Her is the Ref. (https://www.postgresql.org/message-id/4593.1248991148%40sss.pgh.pa.us)
Best regards
Fehmi