Postgresql 中文操作指南
54.7. pg_file_settings #
视图 pg_file_settings 提供了服务器配置文件内容的摘要。对于文件中出现的每个“name = value”条目,都会在此视图中显示一行,带注释指示该值是否可以成功应用。对于未链接到“name = value”条目的问题(例如文件中的语法错误),可能会出现额外的行。
The view pg_file_settings provides a summary of the contents of the server’s configuration file(s). A row appears in this view for each “name = value” entry appearing in the files, with annotations indicating whether the value could be applied successfully. Additional row(s) may appear for problems not linked to a “name = value” entry, such as syntax errors in the files.
此视图有助于检查配置文件中的计划更改是否有效,或诊断之前的故障。请注意,此视图报告的是文件中 current 的内容,而不是服务器最后应用的内容。( pg_settings 视图通常足以判断这一点。)
This view is helpful for checking whether planned changes in the configuration files will work, or for diagnosing a previous failure. Note that this view reports on the current contents of the files, not on what was last applied by the server. (The pg_settings view is usually sufficient to determine that.)
默认情况下,只有超级用户才能读取 pg_file_settings 视图。
By default, the pg_file_settings view can be read only by superusers.
| Table 54.7. pg_file_settings Columns | sourcefile text |
Table 54.7. pg_file_settings Columns
Column Type Description |
sourcefile text Full path name of the configuration file |
sourceline int4 Line number within the configuration file where the entry appears |
seqno int4 Order in which the entries are processed (1..n) |
name text Configuration parameter name |
setting text Value to be assigned to the parameter |
applied bool True if the value can be applied successfully |
error text If not null, an error message indicating why this entry could not be applied |
如果配置文件包含语法错误或无效的参数名称,则服务器将不会尝试应用其中的任何设置,因此所有 applied 字段都会读作 False。在这种情况下,将有一行或多行带有非 null error 字段,表示问题。否则,如果可能的话,将应用各个设置。如果无法应用个别设置(例如值无效,或者无法在服务器启动后更改设置),则它将在 error 字段中显示一条适当的消息。带有 applied = false 的条目可能发生的另一种情况是,它被同一个参数名称后面的条目覆盖;这种情况不视为错误,因此 error 字段中不会显示任何内容。
If the configuration file contains syntax errors or invalid parameter names, the server will not attempt to apply any settings from it, and therefore all the applied fields will read as false. In such a case there will be one or more rows with non-null error fields indicating the problem(s). Otherwise, individual settings will be applied if possible. If an individual setting cannot be applied (e.g., invalid value, or the setting cannot be changed after server start) it will have an appropriate message in the error field. Another way that an entry might have applied = false is that it is overridden by a later entry for the same parameter name; this case is not considered an error so nothing appears in the error field.
请参阅 Section 20.1 以获取有关更改运行时参数的各种方法的更多信息。
See Section 20.1 for more information about the various ways to change run-time parameters.