ir_translation: Index rows size exceeds btree maximum
Bug #544437 reported by
José Pastor
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Sorry my English.
I add new product A with
A.name
A.description_en
description_en is text type then no problem with length.
I can save new product without problem when description_en is very long.
Now, I translate this very long field, description_en, to Spanish with A.description_es
When I entry description_es, system inserts src and valeu in ir_translation.
src set to A.description_en
value set to A.description_es
Because src is involved in some btree index, then A.description_en is length limited.
If A.description_es is long enough then system launchs this message:
ERROR: index row size 5364 exceeds btree maximum, 2713
To post a comment you must log in.
Seems that currently the index is being created like this:
--
CREATE INDEX ir_translation_lts
ON ir_translation
USING btree
(lang, type, src);
--
I think a workaround would be to use partial indexes that exclude long items (you still will be able to search for that long items, they will just took longer):
--
DROP INDEX ir_translation_lts;
CREATE INDEX ir_translation_lts
ON ir_translation
USING btree
(lang, type, src)
WHERE LENGTH(src) < 2500;
--
Can you test if that solves your problem?