> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/19/internals/views/view-pg-file-settings.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 53.8. pg\_file\_settings \#

### 53.8. `pg_file_settings` [#](#view-pg-file-settings) <a href="#view-pg-file-settings" id="view-pg-file-settings"></a>

檢視表 `pg_file_settings` 提供伺服器設定檔內容的摘要。檔案中出現的每一筆「name = value」項目，都會在此檢視表中以一個資料列呈現，並附有註記說明該值是否能成功套用。對於與「name = value」項目無關的問題（例如檔案中的語法錯誤），可能會出現額外的資料列。

此檢視表有助於檢查設定檔中預計進行的變更是否可行，或用於診斷先前的失敗。請注意，此檢視表回報的是檔案的*目前*內容，而不是伺服器最後套用的內容。（要判斷後者，通常使用 [`pg_settings`](https://docs.postgresql.tw/19/internals/views/view-pg-settings.md) 檢視表就已足夠。）

預設情況下，只有超級使用者可以讀取 `pg_file_settings` 檢視表。

#### 表 53.8. `pg_file_settings` 欄位 [#](#view-pg-file-settings-columns) <a href="#view-pg-file-settings-columns" id="view-pg-file-settings-columns"></a>

| <p>欄位類型</p><p>說明</p>                                                                    |
| --------------------------------------------------------------------------------------- |
| <p><code>sourcefile</code> <code>text</code></p><p>設定檔的完整路徑名稱</p>                       |
| <p><code>sourceline</code> <code>int4</code></p><p>該項目在設定檔中出現的行號</p>                    |
| <p><code>seqno</code> <code>int4</code></p><p>各項目被處理的順序（1..<em><code>n</code></em>）</p> |
| <p><code>name</code> <code>text</code></p><p>設定參數名稱</p>                                 |
| <p><code>setting</code> <code>text</code></p><p>要指派給該參數的值</p>                           |
| <p><code>applied</code> <code>bool</code></p><p>若該值可以成功套用，則為 true</p>                   |
| <p><code>error</code> <code>text</code></p><p>若不為 null，則為說明此項目為何無法套用的錯誤訊息</p>           |

<br>

若設定檔包含語法錯誤或無效的參數名稱，伺服器將不會嘗試套用其中的任何設定，因此所有 `applied` 欄位都會顯示為 false。在這種情況下，會有一個或多個資料列的 `error` 欄位不為 null，用以指出問題所在。否則，個別設定會在可能的情況下被套用。若某個設定無法套用（例如值無效，或該設定在伺服器啟動後無法變更），其 `error` 欄位中會有相應的訊息。項目出現 `applied` = false 的另一種可能情況是：它被後面同一參數名稱的項目覆寫；這種情況不視為錯誤，因此 `error` 欄位中不會出現任何內容。

關於變更執行期參數之各種方式的更多資訊，請參閱[第 19.1 節](https://docs.postgresql.tw/19/server-administration/runtime-config/config-setting.md)。

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/view-pg-file-settings.html)（原文版本：18.6；核對日期：2026-10-09）


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/19/internals/views/view-pg-file-settings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
