PostgreSQL crash on Centos/RHEL 7

Solution to PostgreSQL crash on Centos/RHEL 7.

PostgreSQL crash on Centos/RHEL 7

I've been using PostgreSQL on CentOS for several years without a glitch.
Since upgrading to CentOS 7.2 I experienced a crash for the first time.

PANIC: semop(id=..) failed: Invalid argument

While digging into the problem I noticed that the crashed happened all the time after a crontab script ran.
Doing an Internet search revealed the problem is due to systemd 212 that came with Centos 7.2 as it has the feature of removing all IPC objects owned by a user if she or he fully logs out.

The solution is to set RemoveIPC=no in /etc/systemd/logind.conf and to restart systemd-logind service to disable this.

This is why it's good to do LVM or VM snapshots before upgrading, to ensure you have a way to revert when things go wrong.


Share Tweet Send
0 Comments
Loading...
You've successfully subscribed to
Great! Next, complete checkout for full access to
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.