Postgresql fails to restart on reboot

When the system gets rebooted, postgresql doesn’t start even though the service is enabled.
Expected outcome:
Postgresql should start since the service is enabled
Foreman and Proxy versions:
Foreman v3.13

Foreman and Proxy plugin versions:

foreman-tasks The goal of this plugin is to unify the way of showing task statuses across the Foreman instance. It defines Task model for keeping the information about the tasks and Lock for assigning the tasks to resources. The locking allows dealing with preventing multiple colliding tasks to be run on the same resource. It also optionally provides Dynflow infrastructure for using it for managing the tasks. Ivan Nečas 5.2.3
foreman_ansible Ansible integration with Foreman Daniel Lobato Garcia 7.0.4
foreman_openscap Foreman plug-in for managing security compliance reports 5.1.1
foreman_puppet Allow assigning Puppet environments and classes to the Foreman Hosts. Ondřej Ezr and Shira Maximov 2.0.7
foreman_remote_execution A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality. Foreman Remote Execution team 5.0.6
katello Katello adds Content and Subscription Management to Foreman. For this it relies on Candlepin and Pulp. N/A 4.3.1
puppetdb_foreman Disable hosts on PuppetDB after they are deleted or built in Foreman. Follow GitHub - theforeman/puppetdb_foreman: PuppetDB proxy in Foreman and raise an issue/submit a pull request if you need extra functionality. You can also find some help in #theforeman IRC channel on Freenode. Daniel Lobato Garcia 5.0.0

Distribution and version:
CentOS Stream release 8
Other relevant data:
Postgresql doesn’t start because /var/run/postgresql doesn’t exist at startup. If I manually create it like:
mkdir /var/run/postgresql
chown postgres:postgres /var/run/postgresql
chmod 775 /var/run/postgresql
systemctl start postgresql

Then Postgresql will run. Is there a way to ensure /var/run/postgresql exists before postgresql starts?
This is new behavior, postgresql used to start and run automatically.

candlepin fails to start when postgres isn’t running. So I’ve now got a work-around script that gets called from /etc/rc.local containing:

mkdir /var/run/postgresql
chown postgres:postgres /var/run/postgresql
chmod 775 /var/run/postgresql
systemctl start postgresql
sleep 10
foreman-maintain service restart

Seems to work but I’d like to know how to fix the service.