{"Entry":{"collection":"func","key":"pg-current-logfile","name":"pg_current_logfile","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.6","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"10"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"14","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"15"}],"content_hash":"f924c1c050b1391b2f60eb7756f5089c7c1d0065ebec51c85fcd3991cf0a7287","first_version":"10","group":"info","group_label":"System Information Functions And Operators","groups":["info"],"imported_at":"2026-09-27T17:57:29.142289+08:00","last_version":"20","name":"pg_current_logfile","name_key":"pg_current_logfile","position":28045,"present_in":["10","11","12","13","14","15","16","17","18","19","20"],"signature":"pg_current_logfile ( [ text ] ) → text","signature_count":1,"slug":"pg-current-logfile","source_rev":"b7bd9cda","summary":"Returns the path name of the log file currently in use by the logging collector.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-current-logfile","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-current-logfile","SourceRevision":"b7bd9cda","Facts":{"description":"Returns the path name of the log file currently in use by the logging collector. The path includes the log_directory directory and the individual log file name. The result is NULL if the logging collector is disabled. When multiple log files exist, each in a different format, pg_current_logfile without an argument returns the path of the file having the first format found in the ordered list: stderr, csvlog, jsonlog. NULL is returned if no log file has any of these formats. To request information about a specific log file format, supply either csvlog, jsonlog or stderr as the value of the optional parameter. The result is NULL if the log format requested is not configured in log_destination. The result reflects the contents of the current_logfiles file.","description_html":"Returns the path name of the log file currently in use by the logging collector. The path includes the \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e directory and the individual log file name. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the logging collector is disabled. When multiple log files exist, each in a different format, \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e without an argument returns the path of the file having the first format found in the ordered list: \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e, \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e. \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e is returned if no log file has any of these formats. To request information about a specific log file format, supply either \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e or \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e as the value of the optional parameter. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the log format requested is not configured in \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e. The result reflects the contents of the \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e file.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-INFO-SESSION-TABLE","file":"functions-info.html","slug":"18"},"group":"info","group_label":"System Information Functions And Operators","lang":"en","layout":"table-new","pages":["functions-info.html"],"prose_only":false,"signatures":[{"description":"Returns the path name of the log file currently in use by the logging collector. The path includes the log_directory directory and the individual log file name. The result is NULL if the logging collector is disabled. When multiple log files exist, each in a different format, pg_current_logfile without an argument returns the path of the file having the first format found in the ordered list: stderr, csvlog, jsonlog. NULL is returned if no log file has any of these formats. To request information about a specific log file format, supply either csvlog, jsonlog or stderr as the value of the optional parameter. The result is NULL if the log format requested is not configured in log_destination. The result reflects the contents of the current_logfiles file.","description_html":"Returns the path name of the log file currently in use by the logging collector. The path includes the \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e directory and the individual log file name. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the logging collector is disabled. When multiple log files exist, each in a different format, \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e without an argument returns the path of the file having the first format found in the ordered list: \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e, \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e. \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e is returned if no log file has any of these formats. To request information about a specific log file format, supply either \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e or \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e as the value of the optional parameter. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the log format requested is not configured in \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e. The result reflects the contents of the \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e file.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e ( [ \u003cspan class=\"optional\"\u003e\u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_current_logfile ( [ text ] ) → text","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-INFO-SESSION-TABLE","file":"functions-info.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-current-logfile","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_current_logfile","Summary":"返回当前由日志收集器使用的日志文件的路径名。路径包括log_directory目录和单独的日志文件名。如果日志收集器已禁用，则结果为NULL。当存在多个日志文件，每个以不同格式存在时，不带参数的pg_current_logfile返回有序列表中找到的第一个格式的文件路径：stderr，csvlog，jsonlog。如果没有任何日志文件具有这些格式，则返回NULL。要请求有关特定日志文件格式的信息，请将csvlog，jsonlog或stderr作为可选参数的值。如果请求的日志格式未在log_destination中配置，则结果为NULL。结果反映current_logfiles文件的内容。","BodyHTML":"返回当前由日志收集器使用的日志文件的路径名。路径包括\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\" rel=\"nofollow\"\u003elog_directory\u003c/a\u003e目录和单独的日志文件名。如果日志收集器已禁用，则结果为\u003ccode\u003eNULL\u003c/code\u003e。当存在多个日志文件，每个以不同格式存在时，不带参数的\u003ccode\u003epg_current_logfile\u003c/code\u003e返回有序列表中找到的第一个格式的文件路径：\u003ccode\u003estderr\u003c/code\u003e，\u003ccode\u003ecsvlog\u003c/code\u003e，\u003ccode\u003ejsonlog\u003c/code\u003e。如果没有任何日志文件具有这些格式，则返回\u003ccode\u003eNULL\u003c/code\u003e。要请求有关特定日志文件格式的信息，请将\u003ccode\u003ecsvlog\u003c/code\u003e，\u003ccode\u003ejsonlog\u003c/code\u003e或\u003ccode\u003estderr\u003c/code\u003e作为可选参数的值。如果请求的日志格式未在\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\" rel=\"nofollow\"\u003elog_destination\u003c/a\u003e中配置，则结果为\u003ccode\u003eNULL\u003c/code\u003e。结果反映\u003ccode\u003ecurrent_logfiles\u003c/code\u003e文件的内容。\u003cpre\u003epg_current_logfile ( [ text ] ) → text\u003c/pre\u003e返回当前由日志收集器使用的日志文件的路径名。路径包括\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\" rel=\"nofollow\"\u003elog_directory\u003c/a\u003e目录和单独的日志文件名。如果日志收集器已禁用，则结果为\u003ccode\u003eNULL\u003c/code\u003e。当存在多个日志文件，每个以不同格式存在时，不带参数的\u003ccode\u003epg_current_logfile\u003c/code\u003e返回有序列表中找到的第一个格式的文件路径：\u003ccode\u003estderr\u003c/code\u003e，\u003ccode\u003ecsvlog\u003c/code\u003e，\u003ccode\u003ejsonlog\u003c/code\u003e。如果没有任何日志文件具有这些格式，则返回\u003ccode\u003eNULL\u003c/code\u003e。要请求有关特定日志文件格式的信息，请将\u003ccode\u003ecsvlog\u003c/code\u003e，\u003ccode\u003ejsonlog\u003c/code\u003e或\u003ccode\u003estderr\u003c/code\u003e作为可选参数的值。如果请求的日志格式未在\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\" rel=\"nofollow\"\u003elog_destination\u003c/a\u003e中配置，则结果为\u003ccode\u003eNULL\u003c/code\u003e。结果反映\u003ccode\u003ecurrent_logfiles\u003c/code\u003e文件的内容。","SourceRevision":"1b5ca64c","ContentHash":"f4df6b610fd5adf1923a056a9eb060f57b378166265a96ed37576c397a075b18","Payload":{"description_zh":"返回当前由日志收集器使用的日志文件的路径名。路径包括log_directory目录和单独的日志文件名。如果日志收集器已禁用，则结果为NULL。当存在多个日志文件，每个以不同格式存在时，不带参数的pg_current_logfile返回有序列表中找到的第一个格式的文件路径：stderr，csvlog，jsonlog。如果没有任何日志文件具有这些格式，则返回NULL。要请求有关特定日志文件格式的信息，请将csvlog，jsonlog或stderr作为可选参数的值。如果请求的日志格式未在log_destination中配置，则结果为NULL。结果反映current_logfiles文件的内容。","description_zh_html":"返回当前由日志收集器使用的日志文件的路径名。路径包括\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e目录和单独的日志文件名。如果日志收集器已禁用，则结果为\u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。当存在多个日志文件，每个以不同格式存在时，不带参数的\u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e返回有序列表中找到的第一个格式的文件路径：\u003ccode class=\"literal\"\u003estderr\u003c/code\u003e，\u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e。如果没有任何日志文件具有这些格式，则返回\u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。要请求有关特定日志文件格式的信息，请将\u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e或\u003ccode class=\"literal\"\u003estderr\u003c/code\u003e作为可选参数的值。如果请求的日志格式未在\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e中配置，则结果为\u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。结果反映\u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e文件的内容。","signatures":[{"description_zh":"返回当前由日志收集器使用的日志文件的路径名。路径包括log_directory目录和单独的日志文件名。如果日志收集器已禁用，则结果为NULL。当存在多个日志文件，每个以不同格式存在时，不带参数的pg_current_logfile返回有序列表中找到的第一个格式的文件路径：stderr，csvlog，jsonlog。如果没有任何日志文件具有这些格式，则返回NULL。要请求有关特定日志文件格式的信息，请将csvlog，jsonlog或stderr作为可选参数的值。如果请求的日志格式未在log_destination中配置，则结果为NULL。结果反映current_logfiles文件的内容。","description_zh_html":"返回当前由日志收集器使用的日志文件的路径名。路径包括\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e目录和单独的日志文件名。如果日志收集器已禁用，则结果为\u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。当存在多个日志文件，每个以不同格式存在时，不带参数的\u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e返回有序列表中找到的第一个格式的文件路径：\u003ccode class=\"literal\"\u003estderr\u003c/code\u003e，\u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e。如果没有任何日志文件具有这些格式，则返回\u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。要请求有关特定日志文件格式的信息，请将\u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e或\u003ccode class=\"literal\"\u003estderr\u003c/code\u003e作为可选参数的值。如果请求的日志格式未在\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e中配置，则结果为\u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。结果反映\u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e文件的内容。","returns":"text","text":"pg_current_logfile ( [ text ] ) → text","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"601bfaccf78c7e82f4d6e6e5f42c6dc190197a847d14e8e358dbadf0bb0376c1","Text":"pg_current_logfile ( [ text ] ) → text","Returns":"text","Payload":{"description":"Returns the path name of the log file currently in use by the logging collector. The path includes the log_directory directory and the individual log file name. The result is NULL if the logging collector is disabled. When multiple log files exist, each in a different format, pg_current_logfile without an argument returns the path of the file having the first format found in the ordered list: stderr, csvlog, jsonlog. NULL is returned if no log file has any of these formats. To request information about a specific log file format, supply either csvlog, jsonlog or stderr as the value of the optional parameter. The result is NULL if the log format requested is not configured in log_destination. The result reflects the contents of the current_logfiles file.","description_html":"Returns the path name of the log file currently in use by the logging collector. The path includes the \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e directory and the individual log file name. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the logging collector is disabled. When multiple log files exist, each in a different format, \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e without an argument returns the path of the file having the first format found in the ordered list: \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e, \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e. \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e is returned if no log file has any of these formats. To request information about a specific log file format, supply either \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e or \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e as the value of the optional parameter. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the log format requested is not configured in \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e. The result reflects the contents of the \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e file.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e ( [ \u003cspan class=\"optional\"\u003e\u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_current_logfile ( [ text ] ) → text","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
