8
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MacのPostgreSQLでFATAL: could not create shared memory segment: Cannot allocate memoryが出る場合の対応

Posted at

Mac(OS X 10.7で確認)はカーネルで取得できるshared memoryの量がかなり低く設定されているので、shared bufferを確保できずにエラーになることがあります。

$ pg_ctl start                              
server starting
FATAL:  could not create shared memory segment: Cannot allocate memory 

その場合は、パラメータを調整してやれば動きます。

sudo sysctl -w kern.sysv.shmmax=1073741824
sudo sysctl -w kern.sysv.shmall=1073741824
8
7
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?