{
  "schema": 1,
  "sqlstate": "HV001",
  "condition_name": "fdw_out_of_memory",
  "sources": [
    {
      "id": "src.errcodes.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt"
    },
    {
      "id": "src.postgres_fdw.option.18.6",
      "kind": "upstream_source",
      "source_role": "wrapper_implementation",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "contrib/postgres_fdw/option.c",
      "sha256": "880fd16c3e5cbc56733d1292ffdcc9b0f6cb1e17e72c90e9afa4e359239dc314",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/postgres_fdw/option.c"
    },
    {
      "id": "src.dblink.18.6",
      "kind": "upstream_source",
      "source_role": "contrib_client_implementation",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "contrib/dblink/dblink.c",
      "sha256": "e4cfaec3a0a1e5d23fded584725e0f6cf7a17321ad99e5fe046e8b7f97416f15",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/dblink/dblink.c"
    },
    {
      "id": "src.calls.REL_18_6",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "HV001 is fdw_out_of_memory in SQL/MED Class HV.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed errcodes row and macro."
    },
    {
      "id": "postgres-fdw-options",
      "statement": "postgres_fdw reports HV001 when PQconndefaults returns null and when allocation of its copied option array fails.",
      "sources": [
        "src.postgres_fdw.option.18.6"
      ],
      "method": "Read option.c lines 313-341 and its adjacent failure comments.",
      "limits": "The source assumes allocation failure for PQconndefaults; it does not prove global backend memory exhaustion."
    },
    {
      "id": "dblink-options",
      "statement": "dblink reports HV001 when PQconndefaults returns null in two connection-option paths.",
      "sources": [
        "src.dblink.18.6"
      ],
      "method": "Read dblink.c lines 1968-1974 and 2904-2910.",
      "limits": "dblink is a separate contrib client API, not an FDW callback implementation."
    }
  ],
  "messages": [
    {
      "id": "postgres_fdw_pqconndefaults",
      "sqlstate": "HV001",
      "severity": "ERROR",
      "source_ids": [
        "src.postgres_fdw.option.18.6"
      ],
      "path": "contrib/postgres_fdw/option.c:317-319",
      "message": "out of memory",
      "detail": "Could not get libpq's default connection options."
    },
    {
      "id": "postgres_fdw_malloc",
      "sqlstate": "HV001",
      "severity": "ERROR",
      "source_ids": [
        "src.postgres_fdw.option.18.6"
      ],
      "path": "contrib/postgres_fdw/option.c:340-341",
      "message": "out of memory"
    },
    {
      "id": "dblink_pqconndefaults",
      "sqlstate": "HV001",
      "severity": "ERROR",
      "source_ids": [
        "src.dblink.18.6"
      ],
      "path": "contrib/dblink/dblink.c:1972-1974; 2908-2910",
      "message": "out of memory",
      "detail": "Could not get libpq's default connection options."
    }
  ],
  "usage_evidence": [
    {
      "scope": "postgres_fdw-and-dblink-source-paths",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "postgres-fdw-options",
        "dblink-options",
        "postgres_fdw_pqconndefaults",
        "postgres_fdw_malloc",
        "dblink_pqconndefaults"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "postgres-fdw-options",
        "dblink-options"
      ]
    }
  ],
  "runtime": []
}
