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

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

Wiki / SQLSTATE

HV00B — fdw_invalid_handle

包装器收到未知、已关闭或无效的句柄。

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

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

aliases
未知
class name
Foreign Data Wrapper Error (SQL/MED)
condition name
fdw_invalid_handle
lang
en
sqlstate
HV00B

版本定义 PG 18

HV00B — fdw_invalid_handle

速览 {#at-a-glance}

HV00B 表示 FDW 包装器收到的句柄未知、已关闭,或对当前操作无效。对 PostgreSQL 18.6 核心与 contrib 调用的扫描没有解析出直接的 HV00B 报告组,因此句柄类型和具体消息取决于实现。

含义 {#meaning}

SQL/MED 中的“句柄”是实现自己管理的引用,不是 PostgreSQL 关系 OID 或 SQL 事务 ID。包装器可能用句柄表示远端连接、游标、回复或执行对象;这些只是可能的例子,本批没有确认具体的发码包装器。仅凭类别定义无法判断具体是哪一种。

消息与诊断 {#messages}

在已检查的 18.6 核心与 contrib 路径中没有解析出直接的消息变体。应记录包装器名称和版本、句柄种类及生命周期、回调阶段、外部服务器和外部表,以及完整诊断信息。远端连接失败也可能使用其他 SQLSTATE。

诊断 {#diagnosis}

沿包装器源码追踪句柄的创建、传递、复用和关闭。检查扫描或修改回调是否晚于连接销毁,回调是否在清理后运行,以及包装器 ABI 是否与服务器匹配。不要把 NULL SQL 值推断为无效句柄。

处理 {#response}

按包装器 API 修复句柄生命周期,或重新建立包装器管理的连接或对象。如果无法确定写操作是否已经完成,应先查看远端日志再决定是否重试。重复提交相同请求通常不能修复陈旧或已关闭的句柄。

版本 {#versions}

HV00B 从 9.1.0 到 18.6 以及 19 Beta 3 均存在。可用的 9.1 之前定义扫描没有观察到它;这只是历史边界,不是精确的引入版本结论。

相关 {#related}

HV00K 涉及回复句柄;HV009 涉及无效空指针使用;HV00N 涉及建立连接。

来源 {#sources}

比较版本

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

claims · identity
{
  "claim_id": "identity",
  "limits": "",
  "method": "Read the fixed definition row and macro.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "HV00B is fdw_invalid_handle in SQL/MED Class HV."
}
claims · scan-boundary
{
  "claim_id": "scan-boundary",
  "limits": "The generic FDW API boundary does not identify an emitter for this SQLSTATE. The scan does not cover external wrappers, drivers, remote systems, or user callbacks.",
  "method": "Compare resolved report groups with the macro mapping.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.calls.REL_18_6",
    "src.fdwapi.18.6"
  ],
  "statement": "No direct HV00B report group was resolved in the locked PostgreSQL 18.6 core/contrib call scan."
}
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"
}
sources · src.fdwapi.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/include/foreign/fdwapi.h",
  "position": 1,
  "sha256": "572ba892e6435ca92d3b3bc84dde5bbd3160cc3a082693daab8daa835c4d2cd7",
  "source_id": "src.fdwapi.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/foreign/fdwapi.h"
}
sources · src.calls.REL_18_6
{
  "commit": "",
  "docs_url": "",
  "kind": "local_artifact",
  "location": "",
  "path": "raw/calls/REL_18_6.jsonl",
  "position": 2,
  "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf",
  "source_id": "src.calls.REL_18_6",
  "tag": "",
  "url": ""
}

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · english-manuals:2ba952493665a7e8c9165aa8d5bf875a8168176bf9a1b54d0513f325461b4585

正文语言: zh-Hans · english-manuals:2ba952493665a7e8c9165aa8d5bf875a8168176bf9a1b54d0513f325461b4585