In the greenplum environment, using gpconfig to configure cluster parameters, the error semctl error: Invalid argument occurs occasionally
-
- directly above
- root cause
- Parameter description and analysis
- solution
-
- Modify this parameter in /etc/systemd/logind.conf RemoveIPC=no
- Restart the operating system or restart systemd-logind:
- verify
- Remark
Direct above image
When this error occurs, it will also cause the database to enter recovery mode.
Root cause
The system parameter RemoveIPC is set to yes, resulting in .
Parameter description and analysis
RemoveIPC controls whether the System V and POSIX IPC objects belonging to the user should be removed when the user is completely logged off. The value is Boolean.
This parameter was introduced in RHEL7.2 and later, and the default is yes.
Because the postgres database uses shared memory, when this parameter is set to yes, in some scenarios (when the operating system user logs out), the shared memory of postgres will be abnormal, which will cause a series of other abnormal problems.
Solution
Modify this parameter in /etc/systemd/logind.conf RemoveIPC=no
Reboot OS or reboot systemd-logind:
systemctl restart systemd-logind.service
Authentication
loginctl show-session | grep RemoveIPC systemctl show systemd-logind | grep RemoveIPC
Remarks
For database system services (pg, oracle, etc.), if you use RHEL7.2 or later, this problem may exist, which may cause the database to work abnormally. It needs to be used as a general parameter and modified before deploying the database service.