The postgres service (cb-pgsql) fails to start on an EDR primary node with the following error messages logged in the /var/log/cb/pgsql/startup.out file:
<DATE><TIME> EDT [(PID) @ ] FATAL: could not open shared memory segment "/PostgreSQL.XXXXXXXXX": Permission denied
<DATE><TIME> EDT [(PID) @ ] LOG: database system is shut downPostgres service writes a file in the shared memory location /dev/shm that should be mounted to the tmpfs filesystem with full permissions for user root. Here is a working example:
ls -ld /dev/shm
sudo chmod 1777 /dev/shm
df -h /dev/shm
#Edit the fstab file
sudo nano /etc/fstab
# Locate the line related to /dev/shm and update it to the following:
tmpfs /dev/shm tmpfs defaults,noexec,nodev,nosuid,size=2G 0 0
#Remount the /dev/shm
sudo mount -o remount /dev/shm
(Or if you added security options, you can have them take immediate effect with: sudo mount -o remount,noexec,nodev,nosuid /dev/shm)