{"Entry":{"collection":"guc","key":"log_statement_max_length","name":"log_statement_max_length","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Reporting and Logging","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"19","status":"added","to":"20"}],"content_hash":"dd98ecf7ddb7664d0000e6390cb42488b180a7b42737d8d26b06762ea7928e85","context":"","default_changed_in":[],"default_history":[],"editorial":{},"enumvals":[],"first_version":"20","group":"Reporting and Logging","group_slug":"logging","imported_at":"2026-09-30T00:40:57.429251+08:00","intro_commit":{},"key":"log_statement_max_length","last_version":"20","max_val":"","min_val":"","name":"log_statement_max_length","position":249,"present_in":["20"],"short_desc":"If greater than zero, each statement logged by log_statement, log_min_duration_statement, log_min_duration_sample, or log_transaction_sample_rate has its statement text truncated to at most this many bytes.","short_desc_zh":"","source_rev":"english-manuals:1d687e54e7226bafdd722fbef5f1048c861c76c6638290d4b60dc46fe1d81020","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"log_statement_max_length","SourceDatabase":"center","Version":"20","SourceTable":"guc","SourceKey":"log_statement_max_length","SourceRevision":"english-manuals:1d687e54e7226bafdd722fbef5f1048c861c76c6638290d4b60dc46fe1d81020","Facts":{"boot_val":null,"category":"What to Log","context":"","description":"If greater than zero, each statement logged by log_statement, log_min_duration_statement, log_min_duration_sample, or log_transaction_sample_rate has its statement text truncated to at most this many bytes. When a statement is truncated, an ellipsis (...) is appended to indicate that truncation has occurred. A value of zero causes statements to be logged as only an ellipsis. -1 (the default) logs statements in full. If this value is specified without units, it is taken as bytes. This setting does not affect statements logged because of log_min_error_statement. Only superusers and users with the appropriate SET privilege can change this setting.","doc":{"anchor":"GUC-LOG-STATEMENT-MAX-LENGTH","file":"runtime-config-logging.html","lang":"en","sha256":"2a5d4075a753b17259ee33e4681fb5133d151fb4226c96ef69f1543e3ce473f4","slug":"devel"},"documented":true,"enumvals":[],"extra_desc":"","lang":"en","max_val":null,"metadata_version":"","min_val":null,"name":"log_statement_max_length","short_desc":"","source":"english-manual","unit":"","vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-LOG-STATEMENT-MAX-LENGTH","file":"runtime-config-logging.html","lang":"en","sha256":"2a5d4075a753b17259ee33e4681fb5133d151fb4226c96ef69f1543e3ce473f4","slug":"devel"}},"MeasuredEvidence":{"metadata_version":""}},"Text":{"Collection":"guc","Key":"log_statement_max_length","SourceDatabase":"pgweb","Version":"20","Locale":"zh-Hans","Title":"log_statement_max_length","Summary":"","BodyHTML":"\u003cp\u003e如果大于零，通过\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-STATEMENT\" rel=\"nofollow\"\u003elog_statement\u003c/a\u003e、\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-MIN-DURATION-STATEMENT\" rel=\"nofollow\"\u003elog_min_duration_statement\u003c/a\u003e、\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-MIN-DURATION-SAMPLE\" rel=\"nofollow\"\u003elog_min_duration_sample\u003c/a\u003e或\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-TRANSACTION-SAMPLE-RATE\" rel=\"nofollow\"\u003elog_transaction_sample_rate\u003c/a\u003e记录的每条语句，其文本都会被截断为最多这么多字节。语句被截断时，会在末尾附加省略号（\u003ccode\u003e...\u003c/code\u003e），以表明发生了截断。值为零时，语句仅记录为省略号。\u003ccode\u003e-1\u003c/code\u003e（默认值）会完整记录语句。如果指定值时没有单位，则以字节为单位。此设置不影响因\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-MIN-ERROR-STATEMENT\" rel=\"nofollow\"\u003elog_min_error_statement\u003c/a\u003e而记录的语句。只有超级用户和具有适当 \u003ccode\u003eSET\u003c/code\u003e 权限的用户才能更改此设置。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"fbc0e74ce7d84bd8cb23335527d4629988dab5d28c190f9aa9509a5e49ccdd92","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e如果大于零，通过\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-STATEMENT\"\u003elog_statement\u003c/a\u003e、\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-MIN-DURATION-STATEMENT\"\u003elog_min_duration_statement\u003c/a\u003e、\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-MIN-DURATION-SAMPLE\"\u003elog_min_duration_sample\u003c/a\u003e或\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-TRANSACTION-SAMPLE-RATE\"\u003elog_transaction_sample_rate\u003c/a\u003e记录的每条语句，其文本都会被截断为最多这么多字节。语句被截断时，会在末尾附加省略号（\u003ccode class=\"literal\"\u003e...\u003c/code\u003e），以表明发生了截断。值为零时，语句仅记录为省略号。\u003ccode class=\"literal\"\u003e-1\u003c/code\u003e（默认值）会完整记录语句。如果指定值时没有单位，则以字节为单位。此设置不影响因\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-MIN-ERROR-STATEMENT\"\u003elog_min_error_statement\u003c/a\u003e而记录的语句。只有超级用户和具有适当 \u003ccode class=\"literal\"\u003eSET\u003c/code\u003e 权限的用户才能更改此设置。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
