F0000 — config_file_error
配置文件内容或读取有误,严重性随调用者而异。
英文手册覆盖始于 PostgreSQL 8.1. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 18·选择有来源记录的版本
- aliases
- 未知
- class name
- Configuration File Error
- condition name
- config_file_error
- lang
- en
- sqlstate
- F0000
版本定义 PG 18
F0000
速览 {#at-a-glance}
F0000 是配置文件错误条件,但严重性和恢复边界取决于所属调用者。固定核心路径包括归档恢复目标失败和 OAuth HBA 校验;unaccent contrib 词典还有自己的文件打开与规则解析路径。
含义 {#meaning}
归档恢复路径在到达配置目标之前结束时发出 FATAL。OAuth 校验使用 ereport(elevel):HBA 解析器传入级别,load_hba() 在重载时以日志记录解析错误并保留旧规则,postmaster 初次启动时则把 HBA 加载失败转成另一个 FATAL,阻止启动。unaccent 加载器无法打开规则文件时报告 ERROR,重复规则和格式错误的规则行则以此 SQLSTATE 报告 WARNING。
这些是不同所属组件的路径。HBA 解析带行号和文件上下文;词典打开错误带 %m;归档恢复目标消息没有这两类字段。
消息 {#messages}
- FATAL,SQLSTATE
F0000:recovery ended before configured recovery target was reached。 - 由 HBA 加载者选择
elevel,SQLSTATEF0000:oauth_validator_libraries must be set for authentication method %s;上下文:line %d of configuration file "%s"。 - 由 HBA 加载者选择
elevel:invalid list syntax in parameter "%s"。 - 由 HBA 加载者选择
elevel:authentication method "oauth" requires argument "validator" to be set when oauth_validator_libraries contains multiple options;上下文:line %d of configuration file "%s"。 - ERROR,SQLSTATE
F0000:could not open unaccent file "%s": %m。 - WARNING,SQLSTATE
F0000:duplicate source strings, first one will be used。 - WARNING,SQLSTATE
F0000:invalid syntax: more than two strings in unaccent rule或invalid syntax: unfinished quoted string in unaccent rule。
OAuth 模板使用 ereport(elevel),因此函数源码本身不能把所有 HBA 事件都定为 ERROR 或 FATAL;实际启动/重载调用者决定边界。
诊断 {#diagnosis}
保留完整主消息、详细信息、提示、上下文、文件名、行号、子系统和阶段。归档恢复要检查配置目标与可用 WAL/归档。OAuth 要检查 HBA 行和 oauth_validator_libraries 值,区分空列表、列表语法和缺少 validator 参数。unaccent 要检查解析后的规则路径、权限、编码和规则格式;警告可能使词典继续加载并采用首条规则或跳过坏行。
处理 {#response}
按所属组件的格式修正配置,并保留已知正常副本。归档恢复目标的 FATAL 或首次 HBA 加载的 FATAL 会结束启动,没有客户端事务可回滚;修正目标/配置后重启并使用新连接。HBA 重载解析失败只记录日志并保留旧规则,修复文件后需再次重载,不能假设新规则已生效。unaccent ERROR 若在显式客户端事务中发生,继续执行前要 ROLLBACK 或回到已有保存点;警告路径不需要回滚,但应审查被跳过或重复的规则。
版本 {#versions}
锁定目录从 7.4 记录此条件;固定源码覆盖 PostgreSQL 18.6。本源码页没有诱发启动、重载或词典故障。
相关 {#related}
来源 {#sources}
src/backend/access/transam/xlogrecovery.c#L1921-L1931
src/backend/libpq/auth-oauth.c#L813-L870
src/backend/libpq/hba.c#L2635-L2692
src/backend/postmaster/postmaster.c#L1327-L1338
contrib/unaccent/unaccent.c#L65-L109
contrib/unaccent/unaccent.c#L260-L271
结构化证据记录保存固定消息组、调用者选择的 severity 和源码/运行边界。
比较版本
SQLSTATE 证据与已记录的运行版本
claims · identity
{
"claim_id": "identity",
"limits": "",
"method": "Read locked definition snapshot.",
"position": 0,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "F0000 is config_file_error in SQLSTATE Class F0."
}claims · resolved-paths
{
"claim_id": "resolved-paths",
"limits": "Source confirmation is not natural runtime.",
"method": "Read complete source contexts and startup/reload guards.",
"position": 1,
"runtime": [],
"sources": [
"src.path.0",
"src.path.1",
"src.path.2",
"src.path.3",
"src.path.4"
],
"statement": "F0000 has distinct recovery FATAL, caller-selected OAuth HBA, unaccent ERROR, and unaccent WARNING paths; HBA reload keeps old rules while initial startup fails closed."
}claims · history
{
"claim_id": "history",
"limits": "",
"method": "Use locked catalogue boundary.",
"position": 2,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "The locked catalogue records F0000 from 7.4; it does not prove the exact introduction rationale."
}messages · message.0
{
"limits": "",
"message_id": "message.0",
"path": "",
"position": 0,
"raw": {
"id": "message.0",
"primary_template": "recovery ended before configured recovery target was reached",
"severity_source": "FATAL",
"sources": [
"src.path.0"
],
"sqlstate": "F0000"
},
"severity": "FATAL",
"sources": [
"src.path.0"
],
"templates": [
{
"kind": "primary",
"literal": "recovery ended before configured recovery target was reached",
"position": 0,
"role": "",
"template": "recovery ended before configured recovery target was reached"
}
]
}messages · message.1
{
"limits": "",
"message_id": "message.1",
"path": "",
"position": 1,
"raw": {
"context_template": "line %d of configuration file \"%s\"",
"id": "message.1",
"primary_template": "oauth_validator_libraries must be set for authentication method %s",
"severity_source": "caller-selected elevel",
"sources": [
"src.path.1"
],
"sqlstate": "F0000"
},
"severity": "caller-selected elevel",
"sources": [
"src.path.1"
],
"templates": [
{
"kind": "primary",
"literal": "oauth_validator_libraries must be set for authentication method",
"position": 0,
"role": "",
"template": "oauth_validator_libraries must be set for authentication method %s"
},
{
"kind": "context",
"literal": "line of configuration file \" \"",
"position": 1,
"role": "",
"template": "line %d of configuration file \"%s\""
}
]
}messages · message.2
{
"limits": "",
"message_id": "message.2",
"path": "",
"position": 2,
"raw": {
"id": "message.2",
"primary_template": "invalid list syntax in parameter \"%s\"",
"severity_source": "caller-selected elevel",
"sources": [
"src.path.1"
],
"sqlstate": "F0000"
},
"severity": "caller-selected elevel",
"sources": [
"src.path.1"
],
"templates": [
{
"kind": "primary",
"literal": "invalid list syntax in parameter \" \"",
"position": 0,
"role": "",
"template": "invalid list syntax in parameter \"%s\""
}
]
}messages · message.3
{
"limits": "",
"message_id": "message.3",
"path": "",
"position": 3,
"raw": {
"context_template": "line %d of configuration file \"%s\"",
"id": "message.3",
"primary_template": "authentication method \"oauth\" requires argument \"validator\" to be set when oauth_validator_libraries contains multiple options",
"severity_source": "caller-selected elevel",
"sources": [
"src.path.1"
],
"sqlstate": "F0000"
},
"severity": "caller-selected elevel",
"sources": [
"src.path.1"
],
"templates": [
{
"kind": "primary",
"literal": "authentication method \"oauth\" requires argument \"validator\" to be set when oauth_validator_libraries contains multiple options",
"position": 0,
"role": "",
"template": "authentication method \"oauth\" requires argument \"validator\" to be set when oauth_validator_libraries contains multiple options"
},
{
"kind": "context",
"literal": "line of configuration file \" \"",
"position": 1,
"role": "",
"template": "line %d of configuration file \"%s\""
}
]
}messages · message.4
{
"limits": "",
"message_id": "message.4",
"path": "",
"position": 4,
"raw": {
"id": "message.4",
"primary_template": "could not open unaccent file \"%s\": %m",
"severity_source": "ERROR",
"sources": [
"src.path.4"
],
"sqlstate": "F0000"
},
"severity": "ERROR",
"sources": [
"src.path.4"
],
"templates": [
{
"kind": "primary",
"literal": "could not open unaccent file \" \":",
"position": 0,
"role": "",
"template": "could not open unaccent file \"%s\": %m"
}
]
}messages · message.5
{
"limits": "",
"message_id": "message.5",
"path": "",
"position": 5,
"raw": {
"id": "message.5",
"primary_template": "duplicate source strings, first one will be used",
"severity_source": "WARNING",
"sources": [
"src.path.4"
],
"sqlstate": "F0000"
},
"severity": "WARNING",
"sources": [
"src.path.4"
],
"templates": [
{
"kind": "primary",
"literal": "duplicate source strings, first one will be used",
"position": 0,
"role": "",
"template": "duplicate source strings, first one will be used"
}
]
}messages · message.6
{
"limits": "",
"message_id": "message.6",
"path": "",
"position": 6,
"raw": {
"id": "message.6",
"primary_template": "invalid syntax: more than two strings in unaccent rule",
"severity_source": "WARNING",
"sources": [
"src.path.4"
],
"sqlstate": "F0000"
},
"severity": "WARNING",
"sources": [
"src.path.4"
],
"templates": [
{
"kind": "primary",
"literal": "invalid syntax: more than two strings in unaccent rule",
"position": 0,
"role": "",
"template": "invalid syntax: more than two strings in unaccent rule"
}
]
}messages · message.7
{
"limits": "",
"message_id": "message.7",
"path": "",
"position": 7,
"raw": {
"id": "message.7",
"primary_template": "invalid syntax: unfinished quoted string in unaccent rule",
"severity_source": "WARNING",
"sources": [
"src.path.4"
],
"sqlstate": "F0000"
},
"severity": "WARNING",
"sources": [
"src.path.4"
],
"templates": [
{
"kind": "primary",
"literal": "invalid syntax: unfinished quoted string in unaccent rule",
"position": 0,
"role": "",
"template": "invalid syntax: unfinished quoted string in unaccent rule"
}
]
}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#L453"
}sources · src.path.0
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/access/transam/xlogrecovery.c",
"position": 1,
"sha256": "5757d413a6bf3b285fa60ddbbe54b2cdaffde1011ffe51220dfacb8fd9754c5d",
"source_id": "src.path.0",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlogrecovery.c#L1921"
}sources · src.path.1
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/libpq/auth-oauth.c",
"position": 2,
"sha256": "a62e6d17fc7117be3ce536544216a1fa86c527fdbb0ce15841c4b199c6bb04d5",
"source_id": "src.path.1",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/libpq/auth-oauth.c#L813"
}sources · src.path.2
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/libpq/hba.c",
"position": 3,
"sha256": "b31049f83ce504979493155e9f496ab26b5f642969acc1d5280c32a86e7d1db3",
"source_id": "src.path.2",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/libpq/hba.c#L2635"
}sources · src.path.3
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/postmaster/postmaster.c",
"position": 4,
"sha256": "467a6d6deb8f31d1fa599b854511207923a252f02b7d5cbcc878caece577eefb",
"source_id": "src.path.3",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L1327"
}sources · src.path.4
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "contrib/unaccent/unaccent.c",
"position": 5,
"sha256": "4daa6c5972ad9741aa2bb90ceb5e2483738d65bc166b690d41f814dbddb4df9e",
"source_id": "src.path.4",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/unaccent/unaccent.c#L65"
}来源引用
定义来源
center · PostgreSQL 18 · english-manuals:84c80840a8c621903dab868222d18d6e01357cb55333464281ac3ac37e1c2790
正文语言: zh-Hans · english-manuals:84c80840a8c621903dab868222d18d6e01357cb55333464281ac3ac37e1c2790