During the RHEL 8 to 9 leapp upgrade, the satellite-upgrader fails to reindex the DB due to a mismatch in version for the collation "pulp_ansible_semver" as seen in the output below:
2025-07-25 10:51:44.944 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: External command has started: ['runuser', '-u', 'postgres', '--', 'reindexdb', '-a'] 2025-07-25 10:51:45.12 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: reindexdb: reindexing database "candlepin" 2025-07-25 10:51:46.733 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: reindexdb: reindexing database "foreman" 2025-07-25 10:52:02.745 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: reindexdb: reindexing database "postgres" 2025-07-25 10:52:03.57 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: reindexdb: reindexing database "pulpcore" 2025-07-25 10:52:03.538 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: WARNING: collation "pulp_ansible_semver" has version mismatch 2025-07-25 10:52:03.542 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: DETAIL: The collation in the database was created using version 153.80, but the operating system provides version 153.14. 2025-07-25 10:52:03.545 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: HINT: Rebuild all objects affected by this collation and run ALTER COLLATION public.pulp_ansible_semver REFRESH VERSION, or build PostgreSQL with the right library version. 2025-07-25 10:53:00.123 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: reindexdb: reindexing database "template1" 2025-07-25 10:53:00.514 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: External command has finished: ['runuser', '-u', 'postgres', '--', 'reindexdb', '-a'] 2025-07-25 10:53:00.519 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: External command has started: ['runuser', '-c', 'echo "ALTER COLLATION pulp_ansible_semver REFRESH VERSION;" | psql pulpcore', 'postgres'] 2025-07-25 10:53:00.544 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: runuser: failed to execute /usr/localcw/bin/nologin: No such file or directory 2025-07-25 10:53:00.549 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: Command ['runuser', '-c', 'echo "ALTER COLLATION pulp_ansible_semver REFRESH VERSION;" | psql pulpcore', 'postgres'] failed with exit code 127. 2025-07-25 10:53:00.556 DEBUG PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: External command has finished: ['runuser', '-c', 'echo "ALTER COLLATION pulp_ansible_semver REFRESH VERSION;" | psql pulpcore', 'postgres'] 2025-07-25 10:53:00.560 ERROR PID: 6726 leapp.workflow.FirstBoot.satellite_upgrader: Failed to reindex the database: Command ['runuser', '-c', 'echo "ALTER COLLATION pulp_ansible_semver REFRESH VERSION;" | psql pulpcore', 'postgres'] failed with exit code 127.
- links to