↑↓ select↵ open⌫ change scopeOpen full search

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

Wiki / SQLSTATE

25005 — no_active_sql_transaction_for_branch_transaction

25005 is the branch-transaction form of a no-active-SQL-transaction condition. It is distinct from 25P01, and the fixed PostgreSQL 18.6 core scan does not resolve a natural server call site.

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
Invalid Transaction State
condition name
no_active_sql_transaction_for_branch_transaction
lang
en
sqlstate
25005

Definition PG 18

25005 — no_active_sql_transaction_for_branch_transaction

At a glance {#at-a-glance}

25005 is the branch-transaction form of a no-active-SQL-transaction condition. It is distinct from 25P01, and the fixed PostgreSQL 18.6 core scan does not resolve a natural server call site.

Meaning {#meaning}

The code belongs to the branch-transaction family. A normal SAVEPOINT outside BEGIN is the 25P01 path demonstrated elsewhere; it must not be relabeled as 25005.

Diagnosis {#diagnosis}

Capture the branch API operation and whether it had an active branch transaction. With no resolved core message in the fixed scan, the exact server text must come from the reporting implementation that actually emitted the code.

Response {#response}

End or start the branch transaction according to that API’s contract. Do not send a generic rollback recipe based on the name alone, and do not fabricate a PL/pgSQL reproduction.

Source message and runtime boundary {#messages}

The fixed errcodes.txt row defines the condition and macro; the resolved call scan in raw/calls/REL_18_6.jsonl contains no direct report group, so this batch publishes no message template and constructs no natural SQL trigger.

Applicability boundary and case {#case}

The selected runner cases on PostgreSQL 18.6 and 10.21 are not_applicable; they record the source boundary and contain no copyable SQL trigger. Structured evidence · case export

Versions and limits {#versions}

The locked catalogue contains the generated historical membership facts. The selected latest and PG10 cases are both explicit source-only boundaries and are not natural runtime passes.

Related {#related}

25P01 no active SQL transaction, 25003 branch transaction access mode, 25P02 failed SQL transaction.

Sources {#sources}

  • src.errcodes.18.6 (SHA-256 6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba)
  • src.calls.REL_18_6 — raw/calls/REL_18_6.jsonl (SHA-256 9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf)

Compare versions

SQLSTATE evidence and recorded runtime versions

cases · branch_transaction_boundary
{
  "assertions": [
    "No fabricated SQL trigger is included; the selected run records a definition/source boundary."
  ],
  "case_id": "branch_transaction_boundary",
  "cleanup": "Drop the case schema with an owner connection.",
  "has_snippet": false,
  "position": 0,
  "preconditions": [
    "A runner-owned disposable target is provisioned."
  ],
  "repair": "Follow the explicit transaction or source boundary described by the case.",
  "trigger": "Source/definition evidence only; no natural SQL trigger is claimed.",
  "versions": [
    "10",
    "18"
  ]
}
claims · identity
{
  "claim_id": "identity",
  "limits": "It is distinct from 25P01 no_active_sql_transaction.",
  "method": "Read the fixed condition row and macro.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "25005 is no_active_sql_transaction_for_branch_transaction in Class 25."
}
claims · source-boundary
{
  "claim_id": "source-boundary",
  "limits": "No ordinary SQL trigger or format string is asserted.",
  "method": "Scan fixed source call records for SQLSTATE 25005.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.calls.REL_18_6"
  ],
  "statement": "The exhaustive resolved PostgreSQL 18.6 call scan contains no direct 25005 report group; this batch records definition evidence only."
}
runtimes · runtime.25005-batch2-latest-20260909.latest · 18.6 (Homebrew) · not_applicable
{
  "cases": [
    "branch_transaction_boundary"
  ],
  "limits": "",
  "position": 0,
  "raw": {
    "case_manifest": {
      "path": "verify/cases/25005/cases.json",
      "sha256": "c231ee08c385544e970e4035dbd1ba239daab1baeb8f8c2f69bdc61f37e1453a"
    },
    "case_status": "not_applicable",
    "cases": [
      "branch_transaction_boundary"
    ],
    "id": "runtime.25005-batch2-latest-20260909.latest",
    "observed": {
      "case_status": "not_applicable"
    },
    "raw": "verify/results/25005-batch2-latest-20260909/latest/raw.jsonl",
    "raw_sha256": "5fcd5aeae18c6f30610715133b631ef0da3b18fc69783b39aa239641a71a14bf",
    "run_id": "25005-batch2-latest-20260909",
    "server_version": "18.6 (Homebrew)",
    "server_version_num": 180006,
    "status": "not_applicable",
    "summary": "verify/results/25005-batch2-latest-20260909/latest/summary.json",
    "summary_sha256": "c6e53e9208d851535466317c6f559e4cedcb45bd9c8bd3d4318ab20c854944d3",
    "target": "latest",
    "target_status": "passed"
  },
  "run_id": "25005-batch2-latest-20260909",
  "runtime_id": "runtime.25005-batch2-latest-20260909.latest",
  "server_version": "18.6 (Homebrew)",
  "status": "not_applicable",
  "target": "latest"
}
runtimes · runtime.25005-batch2-pg10-20260909.pg10 · 10.21 (Debian 10.21-1.pgdg90+1) · not_applicable
{
  "cases": [
    "branch_transaction_boundary"
  ],
  "limits": "",
  "position": 1,
  "raw": {
    "case_manifest": {
      "path": "verify/cases/25005/cases.json",
      "sha256": "c231ee08c385544e970e4035dbd1ba239daab1baeb8f8c2f69bdc61f37e1453a"
    },
    "case_status": "not_applicable",
    "cases": [
      "branch_transaction_boundary"
    ],
    "id": "runtime.25005-batch2-pg10-20260909.pg10",
    "observed": {
      "case_status": "not_applicable"
    },
    "raw": "verify/results/25005-batch2-pg10-20260909/pg10/raw.jsonl",
    "raw_sha256": "9c3349caa7ecc2ae79a5043132f5f3a341139cf94e819341ae92aa1ec17b5f8f",
    "run_id": "25005-batch2-pg10-20260909",
    "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
    "server_version_num": 100021,
    "status": "not_applicable",
    "summary": "verify/results/25005-batch2-pg10-20260909/pg10/summary.json",
    "summary_sha256": "3110b481d755a035443258247bd83acc2440a291b6ff257253454b6833f1b163",
    "target": "pg10",
    "target_status": "passed"
  },
  "run_id": "25005-batch2-pg10-20260909",
  "runtime_id": "runtime.25005-batch2-pg10-20260909.pg10",
  "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
  "status": "not_applicable",
  "target": "pg10"
}
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.calls.REL_18_6
{
  "commit": "",
  "docs_url": "",
  "kind": "local_artifact",
  "location": "",
  "path": "raw/calls/REL_18_6.jsonl",
  "position": 1,
  "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:fbf2dace73fcc58ca5ff1fae4ea6efada33112fd07f81b2491520fc5a7c5d2d2

Text language: en · english-manuals:fbf2dace73fcc58ca5ff1fae4ea6efada33112fd07f81b2491520fc5a7c5d2d2