Tom Dron <thomas.e.dron@gmail.com> writes:
> fbbgsa@web1:~/.local$ initdb -D ~/.local/data
> ...
> creating template1 database in /home/.local/data/base/1 ... FATAL:
> shmat(id=18808835) failed: Permission denied
That's really weird. Usually problems appear at the preceding shmget
call, not shmat. I'd guess that somehow the System V shared memory
facility is turned off on that machine, but surely it'd fail at shmget
if so. Still, it might be informative to do "sysctl -a | grep shm"
and see what the shmmax/shmall/shmmni parameters are set to.
Also, I gather from the printout that this isn't a terribly late-model
Postgres. If you could try 9.4 or later, that might conceivably have
better luck because it requires only a very small SysV segment.
(This error doesn't sound like it's dependent on segment size, but
I'm grasping at straws...)
regards, tom lane