Bug #37080
closedPG::ProgramLimitExceeded error for Update content counts task on a big setup
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2259163
Description of problem:
After Capsule sync the 'Update Content Counts' task is trigerred. In case of a bigger setup the task fails with error like:
PG::ProgramLimitExceeded: ERROR: index row requires 17440 bytes, maximum size is 8191
Version-Release number of selected component (if applicable):
Katello 4.11.0
How reproducible:
always
Steps to Reproduce:
1. Have a Capsule (unassigned LCE right now).
2. Prepare the content to sync
a) Sync several repos, I used these for example:
ansible-2.9-for-rhel-8-x86_64-rpms
rhel-7-server-ansible-2.9-rpms
rhel-7-server-kickstart
rhel-7-server-rpms
rhel-8-for-x86_64-baseos-kickstart
rhel-8-for-x86_64-baseos-rpms
rhel-9-for-x86_64-baseos-kickstart
rhel-9-for-x86_64-baseos-rpms
rhel-6-server-els-satellite-client-6-rpms
rhel-7-server-satellite-client-6-rpms
satellite-client-6-for-rhel-8-x86_64-rpms
satellite-client-6-for-rhel-9-x86_64-rpms
b) Create 10 LCEs.
c) Create 10 CVs, add all the repos, publish and promote to all LCEs from 2b).
3. Assign the Capsule with Library and all the LCEs from 2b).
4. Sync the Capsule.
Actual results:
After sync is done the Update Content Counts task is spawned and it fails with the PG::ProgramLimitExceeded error
Expected results:
The task should succeed without errors.