↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / SQLSTATE

53000 \u2014 insufficient_resources

服务器资源不足的宽泛条件,需看消息定位资源。

英文手册覆盖始于 PostgreSQL 8.1. 来源历史与运行验证各自保留独立版本边界。

当前阅读 PG 18·选择有来源记录的版本

aliases
未知
class name
Insufficient Resources
condition name
insufficient_resources
lang
en
sqlstate
53000

版本定义 PG 18

53000

速览 {#at-a-glance}

53000 是宽泛的资源不足条件。固定调用者包括后台 worker 启动、本地缓冲区耗尽和文件描述符限制,因此必须结合消息和启动/运行阶段确定资源。

含义 {#meaning}

类别码本身不指向某个参数:could not register background process 指向 worker 容量,no empty local buffer available 指向本地缓冲区,文件描述符变体则分别报告启动最小值或进程分配上限。

诊断 {#diagnosis}

记录 primary、detail/hint、阶段和服务器日志。启动失败时比较进程限制与 worker 配置;运行中则先判断是本地缓冲区、描述符、worker 槽位还是其他固定资源。

处理 {#response}

按消息指出的资源在平台和 PostgreSQL 限制内释放或调整,清理不用的描述符/worker 后验证配置。显式事务中若发生 ERROR,重试前执行 ROLLBACK 或 ROLLBACK TO SAVEPOINT;自动提交只有在指定资源可用后才能重试。服务器进程描述符检查等启动 FATAL 路径没有客户端事务可恢复。未定位资源前不要泛化为重启或改内存。

版本 {#versions}

锁定目录从 7.4 记录;引用调用者来自 PostgreSQL 18.6 源码,未在主机制造资源耗尽。

相关 {#related}

53400、54001、53200

来源 {#sources}

contrib/pg_prewarm/autoprewarm.c#L943-L981

src/backend/storage/buffer/localbuf.c#L270-L272

src/backend/storage/file/fd.c#L1072-L1078

结构化证据记录保存固定消息以及源码/运行边界。

比较版本

SQLSTATE 证据与已记录的运行版本

claims · identity
{
  "claim_id": "identity",
  "limits": "",
  "method": "Read fixed definition.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "53000 is insufficient_resources in SQLSTATE Class 53."
}
claims · resolved-paths
{
  "claim_id": "resolved-paths",
  "limits": "Source confirmation is not natural runtime.",
  "method": "Read complete fixed source contexts.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.path.0",
    "src.path.1",
    "src.path.2"
  ],
  "statement": "The cited PostgreSQL 18.6 source paths support the representative resource and object-state mechanisms described."
}
claims · history
{
  "claim_id": "history",
  "limits": "",
  "method": "Use catalogue boundary.",
  "position": 2,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "The locked catalogue records 53000 from 7.4; that boundary does not prove exact implementation introduction."
}
messages · message.0
{
  "limits": "",
  "message_id": "message.0",
  "path": "",
  "position": 0,
  "raw": {
    "id": "message.0",
    "primary_template": "could not register background process",
    "severity_source": "ERROR",
    "sources": [
      "src.path.0"
    ],
    "sqlstate": "53000"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.0"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "could not register background process",
      "position": 0,
      "role": "",
      "template": "could not register background process"
    }
  ]
}
messages · message.1
{
  "limits": "",
  "message_id": "message.1",
  "path": "",
  "position": 1,
  "raw": {
    "id": "message.1",
    "primary_template": "no empty local buffer available",
    "severity_source": "ERROR",
    "sources": [
      "src.path.1"
    ],
    "sqlstate": "53000"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.1"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "no empty local buffer available",
      "position": 0,
      "role": "",
      "template": "no empty local buffer available"
    }
  ]
}
messages · message.2
{
  "limits": "",
  "message_id": "message.2",
  "path": "",
  "position": 2,
  "raw": {
    "detail_template": "System allows %d, server needs at least %d, %d files are already open.",
    "id": "message.2",
    "primary_template": "insufficient file descriptors available to start server process",
    "severity_source": "FATAL",
    "sources": [
      "src.path.2"
    ],
    "sqlstate": "53000"
  },
  "severity": "FATAL",
  "sources": [
    "src.path.2"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "insufficient file descriptors available to start server process",
      "position": 0,
      "role": "",
      "template": "insufficient file descriptors available to start server process"
    },
    {
      "kind": "detail",
      "literal": "System allows , server needs at least , files are already open.",
      "position": 1,
      "role": "",
      "template": "System allows %d, server needs at least %d, %d files are already open."
    }
  ]
}
sources · src.errcodes.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/utils/errcodes.txt",
  "position": 0,
  "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
  "source_id": "src.errcodes.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L407"
}
sources · src.path.0
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "contrib/pg_prewarm/autoprewarm.c",
  "position": 1,
  "sha256": "cd1e194620b6150afe1f014d8acb7126cffbd0a821b97eb493862574ef44518d",
  "source_id": "src.path.0",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/pg_prewarm/autoprewarm.c#L943"
}
sources · src.path.1
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/storage/buffer/localbuf.c",
  "position": 2,
  "sha256": "aa2214374b99c7f7cf43cd10541a9e9bbccd87a2699f3c9f086d9c895548dbc5",
  "source_id": "src.path.1",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/localbuf.c#L270"
}
sources · src.path.2
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/storage/file/fd.c",
  "position": 3,
  "sha256": "2555a359cc0c98650beb5acb69de49412b15fa1c29944fbc69c158464db78447",
  "source_id": "src.path.2",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/file/fd.c#L1072"
}

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · english-manuals:ee159673a6e649cd3348bd5f3040826ed6334d67c129cc95863cafc65c8d8440

正文语言: zh-Hans · english-manuals:ee159673a6e649cd3348bd5f3040826ed6334d67c129cc95863cafc65c8d8440