HV009 — fdw_invalid_use_of_null_pointer
HV009 — fdw_invalid_use_of_null_pointer
At a glance
HV009 describes an invalid null-pointer use at the FDW boundary. The PostgreSQL 18.6 core/contrib scan found no direct resolved report group, so no safe SQL reproduction or bundled message is claimed.
| Field | Value |
|---|---|
| SQLSTATE | HV009 |
| Condition | fdw_invalid_use_of_null_pointer |
| Status | active |
| Known present by | 9.1.0 |
| Locked snapshots | 9.1.24, 9.2.24, 9.3.25, 9.4.26, 9.5.25, 9.6.24, 10.23, 11.22, 12.22, 13.23, 14.24, 15.19, 16.15, 17.11, 18.6, 19beta3 |
| Macros | ERRCODE_FDW_INVALID_USE_OF_NULL_POINTER |
| Aliases | — |
Meaning
The condition is intended for a wrapper/API contract violation involving a null pointer, such as an absent descriptor, handle, or callback result that the wrapper treats as present. It is not a generic SQL NULL value error and cannot be inferred from a nullable column.
Messages and diagnostics
No fixed core message variant was found. Preserve the pointer-owning callback, handle/descriptor identity, wrapper build, and full server log. A crash, XX000, or a driver exception may occur instead depending on the implementation.
Diagnosis
Treat this as a wrapper defect or contract mismatch until source proves otherwise. Inspect the callback implementation and ABI/API version, then check whether a remote disconnect or failed allocation created the null state. Do not dereference or “repair” the object from SQL.
Response
Stop retrying the same operation while the wrapper defect is present. Preserve logs and isolate the foreign server/table, then upgrade or patch the wrapper after reproducing in a disposable environment. If the process or connection terminated, follow that component’s recovery procedure.
Versions
The condition is observed from 9.1.0 through 18.6 and the 19 Beta 3 preview; pre-9 definition scans did not observe it. No implementation introduction version is claimed.
Related
HV00B is an invalid FDW handle; XX000 is a broader internal-error boundary. A normal SQL null-value condition is in Class 22.
Sources
errcodes.txt— definition, SHA-2566e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba.fdwapi.h— callback boundary.- Structured evidence — bounded scan and source boundary.