> 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/the-sql-language/functions/functions-info/functions-info-controldata.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 9.27.10. 控制資料函式

## 9.27.10. 控制資料函式 [#](#functions-info-controldata) <a href="#functions-info-controldata" id="functions-info-controldata"></a>

[表 9.88](#functions-controldata) 所列的函式會輸出在 `initdb` 期間初始化的資訊，例如系統目錄版本。它們也會顯示關於預寫式日誌（write-ahead logging）與檢查點處理的資訊。這些資訊是整個叢集共通的，並非專屬於任何一個資料庫。這些函式所提供的資訊，大多與 [pg\_controldata](https://docs.postgresql.tw/19/reference/reference-server/app-pgcontroldata.md) 應用程式相同，且來源也相同。

### 表 9.88. 控制資料函式 [#](#functions-controldata) <a href="#functions-controldata" id="functions-controldata"></a>

| <p>函式</p><p>說明</p>                                                                                                                                 |
| -------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>pg\_control\_checkpoint</code> () → <code>record</code></p><p>回傳目前檢查點狀態的資訊，如<a href="#functions-pg-control-checkpoint">表 9.89</a> 所示。</p> |
| <p><code>pg\_control\_system</code> () → <code>record</code></p><p>回傳目前控制檔狀態的資訊，如<a href="#functions-pg-control-system">表 9.90</a> 所示。</p>         |
| <p><code>pg\_control\_init</code> () → <code>record</code></p><p>回傳叢集初始化狀態的資訊，如<a href="#functions-pg-control-init">表 9.91</a> 所示。</p>             |
| <p><code>pg\_control\_recovery</code> () → <code>record</code></p><p>回傳復原狀態的資訊，如<a href="#functions-pg-control-recovery">表 9.92</a> 所示。</p>        |

<br>

### 表 9.89. `pg_control_checkpoint` 輸出欄位 [#](#functions-pg-control-checkpoint) <a href="#functions-pg-control-checkpoint" id="functions-pg-control-checkpoint"></a>

| 欄位名稱                   | 資料型別                       |
| ---------------------- | -------------------------- |
| `checkpoint_lsn`       | `pg_lsn`                   |
| `redo_lsn`             | `pg_lsn`                   |
| `redo_wal_file`        | `text`                     |
| `timeline_id`          | `integer`                  |
| `prev_timeline_id`     | `integer`                  |
| `full_page_writes`     | `boolean`                  |
| `next_xid`             | `text`                     |
| `next_oid`             | `oid`                      |
| `next_multixact_id`    | `xid`                      |
| `next_multi_offset`    | `xid`                      |
| `oldest_xid`           | `xid`                      |
| `oldest_xid_dbid`      | `oid`                      |
| `oldest_active_xid`    | `xid`                      |
| `oldest_multi_xid`     | `xid`                      |
| `oldest_multi_dbid`    | `oid`                      |
| `oldest_commit_ts_xid` | `xid`                      |
| `newest_commit_ts_xid` | `xid`                      |
| `checkpoint_time`      | `timestamp with time zone` |

<br>

### 表 9.90. `pg_control_system` 輸出欄位 [#](#functions-pg-control-system) <a href="#functions-pg-control-system" id="functions-pg-control-system"></a>

| 欄位名稱                       | 資料型別                       |
| -------------------------- | -------------------------- |
| `pg_control_version`       | `integer`                  |
| `catalog_version_no`       | `integer`                  |
| `system_identifier`        | `bigint`                   |
| `pg_control_last_modified` | `timestamp with time zone` |

<br>

### 表 9.91. `pg_control_init` 輸出欄位 [#](#functions-pg-control-init) <a href="#functions-pg-control-init" id="functions-pg-control-init"></a>

| 欄位名稱                         | 資料型別      |
| ---------------------------- | --------- |
| `max_data_alignment`         | `integer` |
| `database_block_size`        | `integer` |
| `blocks_per_segment`         | `integer` |
| `wal_block_size`             | `integer` |
| `bytes_per_wal_segment`      | `integer` |
| `max_identifier_length`      | `integer` |
| `max_index_columns`          | `integer` |
| `max_toast_chunk_size`       | `integer` |
| `large_object_chunk_size`    | `integer` |
| `float8_pass_by_value`       | `boolean` |
| `data_page_checksum_version` | `integer` |
| `default_char_signedness`    | `boolean` |

<br>

### 表 9.92. `pg_control_recovery` 輸出欄位 [#](#functions-pg-control-recovery) <a href="#functions-pg-control-recovery" id="functions-pg-control-recovery"></a>

| 欄位名稱                            | 資料型別      |
| ------------------------------- | --------- |
| `min_recovery_end_lsn`          | `pg_lsn`  |
| `min_recovery_end_timeline`     | `integer` |
| `backup_start_lsn`              | `pg_lsn`  |
| `backup_end_lsn`                | `pg_lsn`  |
| `end_of_backup_record_required` | `boolean` |

<br>

[返回 9.27. 系統資訊函式與運算子](https://docs.postgresql.tw/19/the-sql-language/functions/functions-info.md#functions-info)

***

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


---

# 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/the-sql-language/functions/functions-info/functions-info-controldata.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.
