View Issue Details

IDProjectCategoryView StatusLast Update
0002149Kali LinuxGeneral Bugpublic2015-03-16 05:55
Reporterrhertzog Assigned Tosbrun  
Status resolvedResolutionfixed 
Product Versionkali-dev 
Summary0002149: postgresql doesn't start the first time that systemd tries to start it

On a live system, trying "service postgresql start" doesn't bring up the service. Yet systemd believes that it was correctly executed...




2015-03-10 14:14

administrator   ~0003154

Looks like the problem is with VM having few RAM (512 Mb) PostgreSQL will not start with:

root@kali:~# cat /var/log/postgresql/postgresql-9.4-main.log
2015-03-10 18:54:16 UTC [1626-1] FATAL: could not map anonymous shared memory: Cannot allocate memory
2015-03-10 18:54:16 UTC [1626-2] HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory, swap space, or huge pages. To reduce the request size (currently 148324352 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.

Changing /etc/postgresql/9.4/main/postgresql.conf to set shared_buffers to 64 mb is enough to fix the problem.



2015-03-10 14:18

administrator   ~0003155 mentions a way to fix this via sysctl but I thought that postgresql was already shipping a sysctl.d file... more investigation needed.



2015-03-16 05:55

manager   ~0003168

we update the kali-defaults package to override the file .service: the shared_buffer size is reduced from 128MB to 64MB if memory is too small.
It's resolved in kali-defaults version 2.0~4

Issue History

Date Modified Username Field Change
2015-03-02 04:59 rhertzog New Issue
2015-03-02 04:59 rhertzog Status new => assigned
2015-03-02 04:59 rhertzog Assigned To => sbrun
2015-03-10 14:14 rhertzog Note Added: 0003154
2015-03-10 14:18 rhertzog Note Added: 0003155
2015-03-16 05:55 sbrun Note Added: 0003168
2015-03-16 05:55 sbrun Status assigned => resolved
2015-03-16 05:55 sbrun Resolution open => fixed
2015-11-09 13:44 Mr.Joe Issue cloned: 0002806