我正试图在本地机器上启动PostgreSQL server.

FATAL:  could not create shared memory segment: Invalid argument
DETAIL:  Failed system call was shmget(key=5432001, size=9781248, 03600).
HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 9781248 bytes), reduce PostgreSQL's shared_buffers parameter (currently 1024) and/or its max_connections parameter (currently 13).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memory configuration.  

我搜索并查看了文档,但我试图设置内核.西斯夫.shmmax和kern.西斯夫.shmall正在工作.

推荐答案

Warning: this answer has been made obselete by newer versions of OS X. Please reference Paul Legato's answer below.

在Mac OS X中,系统启动后不能更改shmmax.您需要编辑/etc/rc或/etc/sysctl.conf,记住它需要是4096的倍数.看这里

Postgresql相关问答推荐

在PostgreSQL中,`MY_VARIABLE IN(<;Long_ARRAY_of_Items>;)`何时是FAST?

如何在postgres中测试锁定

PostGresql :正则表达式 Select 其中只有一个正斜杠的行

PostgreSQL 不删除旧的 WAL 档案

使用 pgAdmin 4 v7.4 在 Windows 11 上全新安装 PostgreSQL 15.3-3 无法启动 - 卡在正在加载 pgAdmin 4 v7.4...

Postgres 查询计划器不会使用更便宜的复合索引

PG::UndefinedTable:错误:relation "active_storage_blobs" does not exist

推送到 Heroku 时出现带有 Postgres 的 Rails 迁移错误

OpenShift:如何从我的 PC 连接到 postgresql

错误:CASE types character varying and numeric cannot be matched

如何使用 postgresql 中的存储过程将数据插入表中

Postgres 默认按 id 排序 - worldship

Postgres 日期重叠约束

如何禁用 postgresql缓存优化?

如何在 PostgreSQL 中插入多行

什么是 Postgres session?

有没有办法确保 WHERE 子句在 DISTINCT 之后发生?

PostgreSQL - 必须出现在 GROUP BY 子句中或在聚合函数中使用

Postgres DB 上的整数超出范围

JOIN (SELECT ... ) ue ON 1=1?