↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / SQLSTATE

HV00B — fdw_invalid_handle

HV00B names an invalid FDW handle: a wrapper received a handle that is unknown, closed, or invalid for the current operation. The PostgreSQL 18.6 core/contrib call scan has no resolved direct HV00B report group, so the handle type and message are implementation-specific.

English manual coverage begins with PostgreSQL 8.1. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

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

Definition PG 18

HV00B — fdw_invalid_handle

At a glance {#at-a-glance}

HV00B names an invalid FDW handle: a wrapper received a handle that is unknown, closed, or invalid for the current operation. The PostgreSQL 18.6 core/contrib call scan has no resolved direct HV00B report group, so the handle type and message are implementation-specific.

Meaning {#meaning}

SQL/MED uses “handle” for an implementation-owned reference, not a PostgreSQL relation OID or a SQL transaction ID. A wrapper might use one for a remote connection, cursor, reply, or execution object; these are possible examples, not an established emitter path in this batch. The class definition alone does not identify which one.

Messages and diagnostics {#messages}

No direct 18.6 core/contrib message variant was resolved. Record the wrapper name/version, handle kind and lifetime, callback phase, foreign server/table, and the complete diagnostic. A remote server's connection failure may be a different SQLSTATE.

Diagnosis {#diagnosis}

Trace creation, transfer, reuse, and close of the handle in the wrapper source. Check whether a scan or modification callback outlived a connection, whether a callback ran after cleanup, and whether the wrapper's ABI matches the server. Do not infer that a NULL SQL value is an invalid handle.

Response {#response}

Repair the wrapper's handle lifecycle or recreate the wrapper-owned connection/object according to its API. If the wrapper cannot establish whether a write completed, inspect remote logs before repeating it. An unchanged request is unlikely to repair a stale or closed handle.

Versions {#versions}

HV00B is present from 9.1.0 through 18.6 and in 19 Beta 3. The available pre-9 definition scan did not observe it; this is a history boundary, not an exact introduction claim.

Related {#related}

HV00K concerns a reply handle; HV009 concerns invalid null-pointer use; HV00N concerns establishing a connection.

Sources {#sources}

Compare versions

SQLSTATE evidence and recorded runtime versions

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": ""
}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · english-manuals:2ba952493665a7e8c9165aa8d5bf875a8168176bf9a1b54d0513f325461b4585

Text language: en · english-manuals:2ba952493665a7e8c9165aa8d5bf875a8168176bf9a1b54d0513f325461b4585