|
The error the user current sees in below:
Retrying after attempt 1 for <node>, due to: org.postgresql.util.PSQLException: ERROR: index row size 3368 exceeds maximum 2712 for index "catalog_resources_type_title_idx"
|
A common issue is using a fact value as the title of a resource, but missing the brackets:
notify { "some text here: $facts['my_fact']": }
|
The Puppet docs talk about what will happen here. It assumes that the variable ends at the first character not allowed to be in a variable. So in this case it will take the entire set of facts and have them be the value of the title, followed by the ['my_fact'] part. This string is too long for postgres to index it's normal way and will fail. In this example, all the user needs to do wrap the expression in curly braces:
notify { "some text here: ${facts['my_fact']}": }
|
There are a couple of changes we should make to make diagnosing these issues easier. Today we retry this command over and over even though it will never successfully store. When we catch this exception we should give up on processing it so we don't clutter the long and waste resources. We should also include more information for this specific exception. Useful bits of information are:
-
File name of the offending resource
-
Line number of the offending resource
-
certname
-
A snippet of the "too long" title (i.e. 250 chars or something) to help users see what the content is
|