If a rule targets too many groups, policy generation fails
With a very very large list of groups in a rules, the historization (part of policy generation) fails because we have a pkey constraint on table rulesgroupjoin (rules id + serialization of groups of rules)
However, this pk creates a btree, that cannot index long text - error is
ERROR: index row size 3528 exceeds maximum 2712 for index "rulesgroupjoin_pkey" ASTUCE : Values larger than 1/3 of a buffer page cannot be indexed. Consider a function index of an MD5 hash of the value, or use full text indexing.
dropping the pkey solves the issue
alter table rulesgroupjoin drop constraint rulesgroupjoin_pkey;
recreating an index is still necessary for correct perf of historization though:
CREATE INDEX rule_id_group on rulesgroupjoin (rulePkeyId);