Re: Permission denied error for initdb

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tom Dron <thomas(dot)e(dot)dron(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Permission denied error for initdb
Date: 2016-11-23 14:58:39
Message-ID: 26460.1479913119@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Tom Dron <thomas(dot)e(dot)dron(at)gmail(dot)com> writes:
> fbbgsa(at)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Dron 2016-11-24 00:12:37 Re: Permission denied error for initdb
Previous Message Tom Dron 2016-11-23 07:00:54 Permission denied error for initdb