guy labs guy labs

PostgreSQL – CET FATAL: could not create shared memory segment

Infrastructure, Linux
Lately I updated to the latest PostgreSQL from the Ubuntu repositories and then I got the error "CET FATAL: could not create shared memory segment". As the following error message states, the  value of the kernel is too less or the shared memory propery of PostgreSQL is too high. The complete error message looked like this: My solution was to increase the  kernel parameter as I have a lot of memory left on my server. To see the current value of your  parameter execute the following command : And to check the size of the shared memory of your PostgreSQL instance open up the file   and search for the parameter  . To increase the  parameter of your system you need to edit the   file and add the following at the end of the file: That would increase the  value to 100 mega bytes (104857600 bytes). Next you need to reload the sysctl file with the following command: After that you should be able to restart the PostgreSQL server without any problems. Cheers and have a nice...