Missing sql table mail_thread in Odoo DB

195 views Asked by At

I keep seeing this error in my log file: Odoo Server 12.0:mydb:

ERROR:odoo.sql_db:bad query: INSERT INTO "mail_thread" ("id") VALUES (nextval('mail_thread_id_seq')) RETURNING id#012
ERROR: relation "mail_thread" does not exist#012
LINE 1: INSERT INTO "mail_thread" ("id") VALUES (nextval('mail_threa...#012

It does not affect the operation of odoo12 except for that its eating up my hard disk! I only realized this when my server went down my disk was completely full and had to boot into rescue mode and delete odoo.log which had grown to over 100GB! My server is on linode. I also have iredmail setup on the same server. I currently have odoo set to use syslog instead as a workaround because it rotates the logs every week. I also noticed my daily incremental dump backups were getting pretty big (about 250MB) considering I only use the server for my personal email and I really haven't even fully deployed my Odoo server. I could just create the table mail_thread if I knew more about its structure. Perhaps someone can respond with the sql to create it?

Thanks!

Dave

1

There are 1 answers

1
Jonathan Jacobson On

Perhaps there was some change in the search path, and that's why the process cannot find the table. Please check, as a superuser, if the table already exists in a schema other than the default:

SELECT relnamespace::regnamespace schemaname, *
FROM pg_class
WHERE relname = 'mail_thread';