Is the %d actually in the right place here?
errmsg("picksplit method for %d column of index \"%s\" failed",
attno + 1, RelationGetRelationName(r))
And later in the file there is this, which might have the same problem:
elog(LOG, "PickSplit method of %d columns of index '%s' doesn't support
secondary split",
attno + 1, RelationGetRelationName(r));