After upgrading to the 9.5, the setup process failed with the following error:
org.postgresql.util.PSQLException: ERROR: mergejoin input data is out of order
after executing the following query:
select rds.content as “rds_content”, rds.uuid as “rds_uuid”, rds.kee as “rds_kee”, r.uuid as “r_uuid”, r.plugin_rule_key as “ruleKey”, r.plugin_name as “repositoryKey”, r.description_format as “descriptionFormat”, r.status, r.name, r.plugin_config_key as “configKey”, r.priority as “severity”, r.is_template as “isTemplate”, r.is_external as “isExternal”, r.is_ad_hoc as “isAdHoc”, r.language as “language”, r.template_uuid as “templateUuid”, r.def_remediation_function as “defRemediationFunction”, r.def_remediation_gap_mult as “defRemediationGapMultiplier”, r.def_remediation_base_effort as “defRemediationBaseEffort”, r.gap_description as “gapDescription”, r.system_tags as “systemTagsField”, r.security_standards as “securityStandardsField”, r.rule_type as “type”, r.plugin_key as “pluginKey”, r.scope, r.created_at as “createdAt”, r.updated_at as “updatedAt”, r.note_data as “noteData”, r.note_user_uuid as “noteUserUuid”, r.note_created_at as “noteCreatedAt”, r.note_updated_at as “noteUpdatedAt”, r.remediation_function as “remediationFunction”, r.remediation_gap_mult as “remediationGapMultiplier”, r.remediation_base_effort as “remediationBaseEffort”, r.tags as “tagsField”, r.ad_hoc_name as “adHocName”, r.ad_hoc_description as “adHocDescription”, r.ad_hoc_severity as “adHocSeverity”, r.ad_hoc_type as “adHocType” from rules r left outer join rule_desc_sections rds on rds.rule_uuid = r.uuid
That made my database inconsistent and now my sonar instance won’t run with the following error:
org.sonar.server.exceptions.BadRequestException: Rule with UUID AX2_I9xF-Xhu6cui6fS_ not found
I’m running a PostgreSQL 10.21 and when I run that query with a pg client I get no errors.
Any ideas?