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

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

Wiki / SQLSTATE

53400 \u2014 configuration_limit_exceeded

配置上限或进程槽位耗尽,如后台 worker 槽位。

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

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

aliases
未知
class name
Insufficient Resources
condition name
configuration_limit_exceeded
lang
en
sqlstate
53400

版本定义 PG 18

53400

速览 {#at-a-glance}

53400 表示配置或有限 process slot 已耗尽。固定路径覆盖后台 worker、逻辑复制 worker 和 replication-origin 状态槽位。

含义 {#meaning}

源码区分后台 worker 过多、没有 autovacuum/background worker 槽位、逻辑复制 worker 槽位耗尽以及 replication-origin 状态限制;可确定参数时 hint 会指向它。

诊断 {#diagnosis}

保留组件和参数,检查 worker 数、活动复制、origin ID、slot 及服务器日志;将 worker 槽位与通用资源不足 53000、语句复杂度限制 54001 区分。

处理 {#response}

释放正常占用槽位或在确认进程与内存容量后提高指定配置,按常规 reload/restart 流程验证组件能启动。这些 worker、launcher 和 replication-origin 路径可能运行在后台 backend,而不是客户端事务中;若 ERROR 到达显式客户端事务,重试前执行 ROLLBACK 或 ROLLBACK TO SAVEPOINT,自动提交只有在槽位原因修复后才能重试。不要为制造错误而创建 worker。

版本 {#versions}

锁定目录从 9.2.0 记录;引用路径来自 PostgreSQL 18.6,未执行槽位耗尽运行。

相关 {#related}

53000、55000、54001

来源 {#sources}

src/backend/postmaster/bgworker.c#L1002-L1009

src/backend/replication/logical/launcher.c#L435-L438

src/backend/replication/logical/origin.c#L976-L980

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

比较版本

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

claims · identity
{
  "claim_id": "identity",
  "limits": "",
  "method": "Read fixed definition.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "53400 is configuration_limit_exceeded 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 53400 from 9.2.0; that boundary does not prove exact implementation introduction."
}
messages · message.0
{
  "limits": "",
  "message_id": "message.0",
  "path": "",
  "position": 0,
  "raw": {
    "hint_template": "Consider increasing the configuration parameter \"%s\".",
    "id": "message.0",
    "primary_template": "too many background workers",
    "severity_source": "ERROR",
    "sources": [
      "src.path.0"
    ],
    "sqlstate": "53400"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.0"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "too many background workers",
      "position": 0,
      "role": "",
      "template": "too many background workers"
    },
    {
      "kind": "hint",
      "literal": "Consider increasing the configuration parameter \" \".",
      "position": 1,
      "role": "",
      "template": "Consider increasing the configuration parameter \"%s\"."
    }
  ]
}
messages · message.1
{
  "limits": "",
  "message_id": "message.1",
  "path": "",
  "position": 1,
  "raw": {
    "hint_template": "You might need to increase \"%s\".",
    "id": "message.1",
    "primary_template": "out of logical replication worker slots",
    "severity_source": "ERROR",
    "sources": [
      "src.path.1"
    ],
    "sqlstate": "53400"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.1"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "out of logical replication worker slots",
      "position": 0,
      "role": "",
      "template": "out of logical replication worker slots"
    },
    {
      "kind": "hint",
      "literal": "You might need to increase \" \".",
      "position": 1,
      "role": "",
      "template": "You might need to increase \"%s\"."
    }
  ]
}
messages · message.2
{
  "limits": "",
  "message_id": "message.2",
  "path": "",
  "position": 2,
  "raw": {
    "hint_template": "Increase \"max_active_replication_origins\" and try again.",
    "id": "message.2",
    "primary_template": "could not find free replication state slot for replication origin with ID %d",
    "severity_source": "ERROR",
    "sources": [
      "src.path.2"
    ],
    "sqlstate": "53400"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.2"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "could not find free replication state slot for replication origin with ID",
      "position": 0,
      "role": "",
      "template": "could not find free replication state slot for replication origin with ID %d"
    },
    {
      "kind": "hint",
      "literal": "Increase \"max_active_replication_origins\" and try again.",
      "position": 1,
      "role": "",
      "template": "Increase \"max_active_replication_origins\" and try again."
    }
  ]
}
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#L411"
}
sources · src.path.0
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/postmaster/bgworker.c",
  "position": 1,
  "sha256": "b254fc4e39694a56ac511c4c9246b9b1c8b9b5c7fc86d2808c13edd9b7e21750",
  "source_id": "src.path.0",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/bgworker.c#L1002"
}
sources · src.path.1
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/replication/logical/launcher.c",
  "position": 2,
  "sha256": "a38722170de7ef37cd6e45e921d7f025575636d25e892f52f15e251edd4dc450",
  "source_id": "src.path.1",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/logical/launcher.c#L435"
}
sources · src.path.2
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/replication/logical/origin.c",
  "position": 3,
  "sha256": "81e5d5b4539b67bb372f0f0a05395af900c322cdbcec8a4b1f358333a16e6518",
  "source_id": "src.path.2",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/logical/origin.c#L976"
}

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · english-manuals:bc6116f6062d9b9af34531ab4a0449f245098a196d010a20e195657838eef675

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