Katello installable updates not updating

Hi all,

Problem:
I have installed Katello 4.16.2 - upgraded from multiple versions. All subscribed hosts are RHEL8/9 and are working fine except applicable package and errata versions. All counters are 0 in content hosts list.

Expected outcome:
Content hosts should show installable updates (security, bug, feature and rpm package updates) instead of 0.

Foreman and Proxy versions:
foreman-3.14.0-1.el9.noarch
foreman-proxy.3.14.0-1.el9.noarch

Foreman and Proxy plugin versions:
foreman-tasks 10.0.2
foreman_ansible 15.0.7
foreman_bootdisk 22.0.3
foreman_puppet 8.1.1
foreman_remote_Execution 15.0.2
katello 4.16.2

Distribution and version:
CentOS 9 Stream

Other relevant data:

In Foreman production.log everything seems fine - no warnings and no errors. The Job “Bulk generate applicability for host” runs without error. On the content hosts, subscription manager updates profile.json and subscription manager would push this file to katello. Last checkin seems fine, also. It runs every 240 minutes. When I do a “dnf uploadprofile --force-upload”, a task with “Bulk generate applicability” is starting and succeed with 100%. “foreman-installer” runs without errors.

I think, I have some issues with postgres database or some functions in it. But I am not sure, unfortunately. Does someone has a hint to get statistics again?

Thanks very much

Ok I find the problem and solved it. All postgres functions and triggers were removed. I added triggers and functions again and it worked over time. Column “evr” on table katello_rpms and katello_installed_packages were empty - now there are strings in updated rows again and with publising a new version of a content view, actual package statistics are shown in the webui.