TL;DR: increasing kernel.shmmax is no longer necessary.
PostgreSQL used to need a large kernel.shmmax
before version 9.3, as its "shared buffers" were allocated using SysV shared memory.
It used to have this recommendation:
https://www.postgresql.org/docs/9.2/static/kernel-resources.html
which is now obsolete (9.2 has been EOL'ed in 2017).
The most important shared memory parameter is SHMMAX, the maximum
size, in bytes, of a shared memory segment. If you get an error
message from shmget like "Invalid argument", it is likely that this
limit has been exceeded. The size of the required shared memory
segment varies depending on several PostgreSQL configuration
parameters, as shown in Table 17-2. (Any error message you might get
will include the exact size of the failed allocation request.) You
can, as a temporary solution, lower some of those settings to avoid
the failure. While it is possible to get PostgreSQL to run with SHMMAX
as small as 2 MB, you need considerably more for acceptable
performance. Desirable settings are in the hundreds of megabytes to a
few gigabytes.
But that's not the version you're using.
For 9.5, see the documentation at
https://www.postgresql.org/docs/9.5/static/kernel-resources.html :
PostgreSQL requires a few bytes of System V shared memory (typically
48 bytes, on 64-bit platforms) for each copy of the server. On most
modern operating systems, this amount can easily be allocated.