{
  "schema": 1,
  "sqlstate": "F0001",
  "condition_name": "lock_file_exists",
  "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#L454",
      "lines": "454"
    },
    {
      "id": "src.path.0",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/init/miscinit.c",
      "sha256": "54bdb859c143a6c70d86067ccf2e124f59aa0852e5705bb653652e41a60af39a",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/init/miscinit.c#L1262",
      "lines": "1262-1427"
    },
    {
      "id": "src.path.1",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/port/sysv_shmem.c",
      "sha256": "150a1143ebffbc726243cb1925109b3237173100814633ee3822f4470ca488de",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/port/sysv_shmem.c#L306",
      "lines": "306-335,765-835"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "F0001 is lock_file_exists in SQLSTATE Class F0.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read locked definition snapshot."
    },
    {
      "id": "resolved-paths",
      "statement": "Startup distinguishes a live lock owner, an empty or stale lock, and shared memory associated with the intended data directory; only the live/in-use branches emit the fixed F0001 FATAL messages.",
      "sources": [
        "src.path.0",
        "src.path.1"
      ],
      "method": "Read complete PID, shared-memory identity, and startup cleanup guards.",
      "limits": "Source confirmation is not natural runtime."
    },
    {
      "id": "history",
      "statement": "The locked catalogue records F0001 from 7.4; it does not prove the exact introduction rationale.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Use locked catalogue boundary."
    }
  ],
  "messages": [
    {
      "id": "message.0",
      "sqlstate": "F0001",
      "primary_template": "lock file \"%s\" already exists",
      "severity_source": "FATAL",
      "sources": [
        "src.path.0"
      ],
      "hint_template": "Is another postgres (PID %d) running in data directory \"%s\"?",
      "hint_variants": [
        "Is another postmaster (PID %d) running in data directory \"%s\"?",
        "Is another postgres (PID %d) using socket file \"%s\"?",
        "Is another postmaster (PID %d) using socket file \"%s\"?"
      ]
    },
    {
      "id": "message.1",
      "sqlstate": "F0001",
      "primary_template": "lock file \"%s\" is empty",
      "severity_source": "FATAL",
      "sources": [
        "src.path.0"
      ],
      "hint_template": "Either another server is starting, or the lock file is the remnant of a previous server startup crash."
    },
    {
      "id": "message.2",
      "sqlstate": "F0001",
      "primary_template": "pre-existing shared memory block (key %lu, ID %lu) is still in use",
      "severity_source": "FATAL",
      "sources": [
        "src.path.0",
        "src.path.1"
      ],
      "hint_template": "Terminate any old server processes associated with data directory \"%s\"."
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "fixed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "resolved-paths"
      ]
    },
    {
      "scope": "history",
      "status": "unknown",
      "evidence_ids": [
        "history"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "resolved-paths"
      ]
    }
  ],
  "runtime": []
}
