> 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/appendixes/release/release-18.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# E.6. 18 版 \#

### E.6. 18 版 [#](#release-18) <a href="#release-18" id="release-18"></a>

[E.6.1. 概覽](#release-18-highlights)

[E.6.2. 遷移至 18 版](#release-18-migration)

[E.6.3. 變更內容](#release-18-changes)

[E.6.4. 致謝](#release-18-acknowledgements)

\*\*發佈日期：\*\*2025-09-25

#### E.6.1. 概覽 [#](#release-18-highlights) <a href="#release-18-highlights" id="release-18-highlights"></a>

PostgreSQL 18 包含許多新功能與改進，包括：

* 非同步 I/O（AIO）子系統，可以提升循序掃描、點陣圖堆積掃描、清理（vacuum）及其他操作的效能。
* [pg\_upgrade](https://docs.postgresql.tw/19/reference/reference-server/pgupgrade.md) 現在會保留最佳化器統計資訊。
* 支援「跳躍掃描」（skip scan）查找，讓 [多欄位 B-tree 索引](https://docs.postgresql.tw/19/the-sql-language/indexes/indexes-multicolumn.md)能在更多情況下使用。
* 新增 [`uuidv7()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-uuid.md#functions-uuid-table) 函式，用於產生依時間戳記排序的 [UUID](https://docs.postgresql.tw/19/the-sql-language/datatype/datatype-uuid.md)。
* 虛擬 [產生欄位](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-GENERATED-STORED)， 在讀取操作時才計算其值。這現在是產生欄位的預設方式。
* 支援 [OAuth 認證](https://docs.postgresql.tw/19/server-administration/client-authentication/auth-oauth.md)。
* 在 [INSERT](https://docs.postgresql.tw/19/reference/sql-commands/sql-insert.md)、[UPDATE](https://docs.postgresql.tw/19/reference/sql-commands/sql-update.md)、 [DELETE](https://docs.postgresql.tw/19/reference/sql-commands/sql-delete.md) 與 [MERGE](https://docs.postgresql.tw/19/reference/sql-commands/sql-merge.md) 命令的 [`RETURNING`](https://docs.postgresql.tw/19/the-sql-language/dml/dml-returning.md) 子句中支援 `OLD` 與 `NEW`。
* 時態限制條件（temporal constraints），即以範圍為對象的限制條件，適用於 [PRIMARY KEY](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-PRIMARY-KEY)、 [UNIQUE](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-UNIQUE) 與 [FOREIGN KEY](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-REFERENCES) 限制條件。

以上項目以及 PostgreSQL 18 的其他新功能，在以下各節有更詳細的說明。

#### E.6.2. 遷移至 18 版 [#](#release-18-migration) <a href="#release-18-migration" id="release-18-migration"></a>

想從任何先前版本遷移資料的使用者，必須使用 [pg\_dumpall](https://docs.postgresql.tw/19/reference/reference-client/app-pg-dumpall.md) 進行傾印／還原，或使用 [pg\_upgrade](https://docs.postgresql.tw/19/reference/reference-server/pgupgrade.md)，或使用邏輯複寫。關於遷移至新主要版本的一般資訊，請參閱[第 18.6 節](https://docs.postgresql.tw/19/server-administration/runtime/upgrading.md)。

18 版包含一些可能影響與先前版本相容性的變更。請注意以下不相容之處：

* 將 [initdb](https://docs.postgresql.tw/19/reference/reference-server/app-initdb.md) 的預設值改為啟用資料檢查碼 (Greg Sabino Mullane) [§](https://postgr.es/c/04bec894a04)

  可以使用新的 initdb 選項 `--no-data-checksums` 停用檢查碼。[pg\_upgrade](https://docs.postgresql.tw/19/reference/reference-server/pgupgrade.md) 要求新舊叢集的檢查碼設定一致，因此這個新選項可用於升級未啟用檢查碼的舊叢集。
* 變更時區縮寫的處理方式 (Tom Lane) [§](https://postgr.es/c/d7674c9fa)

  系統現在會先採用目前工作階段時區的縮寫，再檢查伺服器變數 [timezone\_abbreviations](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-client.md#GUC-TIMEZONE-ABBREVIATIONS)。先前會先檢查 `timezone_abbreviations`。
* 棄用 [MD5 密碼](https://docs.postgresql.tw/19/server-administration/client-authentication/auth-password.md) 認證 (Nathan Bossart) [§](https://postgr.es/c/db6a4a985)

  對 MD5 密碼的支援將在未來的主要版本中移除。[CREATE ROLE](https://docs.postgresql.tw/19/reference/sql-commands/sql-createrole.md) 與 [ALTER ROLE](https://docs.postgresql.tw/19/reference/sql-commands/sql-alterrole.md) 現在於設定 MD5 密碼時會發出棄用警告。可以將 [md5\_password\_warnings](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-connection.md#GUC-MD5-PASSWORD-WARNINGS) 參數設為 `off` 來停用這些警告。
* 變更 [VACUUM](https://docs.postgresql.tw/19/reference/sql-commands/sql-vacuum.md) 與 [ANALYZE](https://docs.postgresql.tw/19/reference/sql-commands/sql-analyze.md)， 使其處理父資料表的繼承子資料表 (Michael Harris) [§](https://postgr.es/c/62ddf7ee9)

  可以使用新的 `ONLY` 選項執行先前的行為。
* 防止 [`COPY FROM`](https://docs.postgresql.tw/19/reference/sql-commands/sql-copy.md) 在讀取 CSV 檔案時將 `\.` 視為檔案結束標記 (Daniel Vérité, Tom Lane) [§](https://postgr.es/c/770233748) [§](https://postgr.es/c/da8a4c166)

  [psql](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md) 從 `STDIN` 讀取 CSV 檔案時，仍會將 `\.` 視為檔案結束標記。 連線到 PostgreSQL 18 伺服器的舊版 psql 用戶端，可能會遇到 [`\copy`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-META-COMMANDS-COPY) 問題。此版本也強制規定 `\.` 必須單獨出現在一行。
* 不再允許無日誌（unlogged）分割資料表 (Michael Paquier) [§](https://postgr.es/c/e2bab2d79)

  先前 [`ALTER TABLE SET [UN]LOGGED`](https://docs.postgresql.tw/19/reference/sql-commands/sql-altertable.md) 不會有任何作用，而且建立無日誌分割資料表時，其子資料表也不會成為無日誌資料表。
* 以觸發事件排入佇列時作用中的角色執行 `AFTER` [觸發程序](https://docs.postgresql.tw/19/server-programming/triggers.md) (Laurenz Albe) [§](https://postgr.es/c/01463e1cc)

  先前這類觸發程序是以觸發程序執行當時（例如在 [COMMIT](https://docs.postgresql.tw/19/reference/sql-commands/sql-commit.md) 時）作用中的角色執行。 在排入佇列到交易提交之間變更角色的情況下，這項差異很重要。
* 移除 [GRANT](https://docs.postgresql.tw/19/reference/sql-commands/sql-grant.md)/[REVOKE](https://docs.postgresql.tw/19/reference/sql-commands/sql-revoke.md) 中對規則（rule）權限的無作用支援 (Fujii Masao) [§](https://postgr.es/c/fefa76f70)

  這些自 PostgreSQL 8.2 起就已不具作用。
* 移除欄位 [`pg_backend_memory_contexts`](https://docs.postgresql.tw/19/internals/views/view-pg-backend-memory-contexts.md).`parent` (Melih Mutlu) [§](https://postgr.es/c/f0d112759)

  由於已新增 `pg_backend_memory_contexts`.`path`， 不再需要此欄位。
* 將 `pg_backend_memory_contexts`.`level` 與 [`pg_log_backend_memory_contexts()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-admin/functions-admin-signal.md#functions-admin-signal-table) 改為從 1 起算 (Melih Mutlu, Atsushi Torikoshi, David Rowley, Fujii Masao) [§](https://postgr.es/c/32d3ed816) [§](https://postgr.es/c/d9e03864b) [§](https://postgr.es/c/706cbed35)

  這些先前是從 0 起算。
* 變更[全文檢索](https://docs.postgresql.tw/19/the-sql-language/textsearch.md)，改用叢集預設的定序提供者讀取設定檔與字典，而不再一律使用 libc (Peter Eisentraut) [§](https://postgr.es/c/fb1a18810f0)

  預設使用非 libc 定序提供者（例如 ICU、builtin），且這些提供者對 LC\_CTYPE 所處理字元的行為與 libc 不同的叢集，可能會觀察到某些全文檢索函式以及 [pg\_trgm](https://docs.postgresql.tw/19/appendixes/contrib/pgtrgm.md) 擴充功能的行為改變。 使用 [pg\_upgrade](https://docs.postgresql.tw/19/reference/reference-server/pgupgrade.md) 升級這類叢集時，建議在升級後重建所有與全文檢索及 pg\_trgm 相關的索引。

#### E.6.3. 變更內容 [#](#release-18-changes) <a href="#release-18-changes" id="release-18-changes"></a>

以下詳細說明 PostgreSQL 18 與前一個主要版本之間的變更。

##### E.6.3.1. 伺服器 [#](#RELEASE-18-SERVER)

**E.6.3.1.1. 最佳化器** [**#**](#RELEASE-18-OPTIMIZER)

* 自動移除某些不必要的資料表自我連接 (Andrey Lepikhov, Alexander Kuzmenkov, Alexander Korotkov, Alena Rybakina) [§](https://postgr.es/c/fc069a3a6)

  可以使用伺服器變數 [enable\_self\_join\_elimination](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-query.md#GUC-ENABLE-SELF-JOIN-ELIMINATION) 停用此最佳化。
* 將某些 [`IN (VALUES ...)`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-comparisons.md#functions-comparisons-in-scalar) 轉換為 `x = ANY ...`，以取得更好的最佳化器統計資訊 (Alena Rybakina, Andrei Lepikhov) [§](https://postgr.es/c/c0962a113)
* 允許將 [`OR`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-logical.md) 子句轉換為陣列，以加快索引處理 (Alexander Korotkov, Andrey Lepikhov) [§](https://postgr.es/c/ae4569161)
* 加快 [`INTERSECT`](https://docs.postgresql.tw/19/reference/sql-commands/sql-select.md#intersect-zi-ju)、 [`EXCEPT`](https://docs.postgresql.tw/19/reference/sql-commands/sql-select.md#except-zi-ju)、[視窗彙總函式](https://docs.postgresql.tw/19/tutorial/tutorial-advanced/tutorial-window.md)與[檢視表欄位別名](https://docs.postgresql.tw/19/reference/sql-commands/sql-createview.md)的處理速度 (Tom Lane, David Rowley) [§](https://postgr.es/c/52c707483) [§](https://postgr.es/c/276279295) [§](https://postgr.es/c/8d96f57d5) [§](https://postgr.es/c/908a96861)
* 允許在內部重新排列 [`SELECT DISTINCT`](https://docs.postgresql.tw/19/reference/sql-commands/sql-select.md#distinct-zi-ju) 的鍵順序以避免排序 (Richard Guo) [§](https://postgr.es/c/a8ccf4e93)

  可以使用 [enable\_distinct\_reordering](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-query.md#GUC-ENABLE-DISTINCT-REORDERING) 停用此最佳化。
* 忽略函數相依於其他欄位的 [`GROUP BY`](https://docs.postgresql.tw/19/reference/sql-commands/sql-select.md#group-by-zi-ju) 欄位 (Zhang Mingli, Jian He, David Rowley) [§](https://postgr.es/c/bd10ec529)

  若 `GROUP BY` 子句包含某個唯一值索引的所有欄位，以及同一資料表的其他欄位，那些其他欄位就是多餘的，可以從分組中捨去。 對於非延遲的主鍵，原本就已如此。
* 允許將 [`GROUPING SETS`](https://docs.postgresql.tw/19/the-sql-language/queries/queries-table-expressions.md#queries-grouping-sets) 上的某些 [`HAVING`](https://docs.postgresql.tw/19/reference/sql-commands/sql-select.md#having-zi-ju) 子句下推為 [`WHERE`](https://docs.postgresql.tw/19/reference/sql-commands/sql-select.md#where-zi-ju) 子句 (Richard Guo) [§](https://postgr.es/c/67a54b9e8) [§](https://postgr.es/c/247dea89f) [§](https://postgr.es/c/f5050f795) [§](https://postgr.es/c/cc5d98525)

  這讓資料列可以更早被篩選。此版本也修正了某些過去會傳回錯誤結果的 `GROUPING SETS` 查詢。
* 改進對使用 [`numeric`](https://docs.postgresql.tw/19/the-sql-language/datatype/datatype-numeric.md) 與 [`timestamp`](https://docs.postgresql.tw/19/the-sql-language/datatype/datatype-datetime.md) 值的 [`generate_series()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-srf.md#functions-srf-series) 的資料列數估計 (David Rowley, Song Jinzhou) [§](https://postgr.es/c/036bdcec9) [§](https://postgr.es/c/97173536e)
* 允許最佳化器使用 `Right Semi Join` 計畫 (Richard Guo) [§](https://postgr.es/c/aa86129e1)

  半連接用於需要判斷是否存在至少一筆相符資料的情況。
* 允許合併連接使用[遞增排序](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-query.md#GUC-ENABLE-INCREMENTAL-SORT) (Richard Guo) [§](https://postgr.es/c/828e94c9d)
* 提高規劃存取大量分割區之查詢的效率 (Ashutosh Bapat, Yuya Watari, David Rowley) [§](https://postgr.es/c/88f55bc97) [§](https://postgr.es/c/d69d45a5a)
* 允許在更多情況下使用[分割區層級連接（partitionwise joins）](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-query.md#GUC-ENABLE-PARTITIONWISE-JOIN)，並減少其記憶體用量 (Richard Guo, Tom Lane, Ashutosh Bapat) [§](https://postgr.es/c/9b282a935) [§](https://postgr.es/c/513f4472a)
* 改進分割區查詢的成本估計 (Nikita Malakhov, Andrei Lepikhov) [§](https://postgr.es/c/fae535da0)
* 改進 [SQL 語言函式](https://docs.postgresql.tw/19/server-programming/extend/xfunc-sql.md)的計畫快取 (Alexander Pyhalov, Tom Lane) [§](https://postgr.es/c/0dca5d68d) [§](https://postgr.es/c/09b07c295)
* 改進對已停用最佳化器功能的處理 (Robert Haas) [§](https://postgr.es/c/e22253467)

**E.6.3.1.2. 索引** [**#**](#RELEASE-18-INDEXES)

* 允許對 [btree](https://docs.postgresql.tw/19/server-programming/extend/xfunc-sql.md) 索引進行跳躍掃描 (Peter Geoghegan) [§](https://postgr.es/c/92fe23d93) [§](https://postgr.es/c/8a510275d)

  這讓多欄位 btree 索引能在更多情況下使用，例如第一個或前幾個索引欄位沒有限制條件（或只有非等值的限制條件），而後面的索引欄位有可用的限制條件時。
* 允許非 btree 的唯一值索引作為分割鍵，以及用於具體化檢視表 (Mark Dilger) [§](https://postgr.es/c/f278e1fe3) [§](https://postgr.es/c/9d6db8bec)

  該索引類型仍必須支援等值比較。
* 允許平行建立 [`GIN`](https://docs.postgresql.tw/19/internals/indextypes/gin.md) 索引 (Tomas Vondra, Matthias van de Meent) [§](https://postgr.es/c/8492feb98)
* 允許先將值排序，以加快範圍型別 [GiST](https://docs.postgresql.tw/19/internals/indextypes/gist.md) 與 [btree](https://docs.postgresql.tw/19/internals/indextypes/btree.md) 索引的建立 (Bernd Helmle) [§](https://postgr.es/c/e9e7b6604)

**E.6.3.1.3. 一般效能** [**#**](#RELEASE-18-PERFORMANCE)

* 新增非同步 I/O 子系統 (Andres Freund, Thomas Munro, Nazir Bilal Yavuz, Melanie Plageman) [§](https://postgr.es/c/02844012b) [§](https://postgr.es/c/da7226993) [§](https://postgr.es/c/55b454d0e) [§](https://postgr.es/c/247ce06b8) [§](https://postgr.es/c/10f664684) [§](https://postgr.es/c/06fb5612c) [§](https://postgr.es/c/c325a7633) [§](https://postgr.es/c/50cb7505b) [§](https://postgr.es/c/047cba7fa) [§](https://postgr.es/c/12ce89fd0) [§](https://postgr.es/c/2a5e709e7)

  此功能讓後端可以將多個讀取請求排入佇列，使循序掃描、點陣圖堆積掃描、清理等操作更有效率。此功能由伺服器變數 [io\_method](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-resource.md#GUC-IO-METHOD) 啟用，並新增伺服器變數 [io\_combine\_limit](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-resource.md#GUC-IO-COMBINE-LIMIT) 與 [io\_max\_combine\_limit](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-resource.md#GUC-IO-MAX-COMBINE-LIMIT) 加以控制。 這也讓不支援 `fadvise()` 的系統可以將 [effective\_io\_concurrency](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-resource.md#GUC-EFFECTIVE-IO-CONCURRENCY) 與 [maintenance\_io\_concurrency](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-resource.md#GUC-MAINTENANCE-IO-CONCURRENCY) 設為大於零的值。新的系統檢視表 [`pg_aios`](https://docs.postgresql.tw/19/internals/views/view-pg-aios.md) 會顯示用於非同步 I/O 的檔案控制代碼。
* 改進存取大量關聯之查詢的鎖定效能 (Tomas Vondra) [§](https://postgr.es/c/c4d5cb71d)
* 改進雜湊連接與 [`GROUP BY`](https://docs.postgresql.tw/19/reference/sql-commands/sql-select.md#group-by-zi-ju) 的效能並減少記憶體用量 (David Rowley, Jeff Davis) [§](https://postgr.es/c/adf97c156) [§](https://postgr.es/c/0f5738202) [§](https://postgr.es/c/4d143509c) [§](https://postgr.es/c/a0942f441) [§](https://postgr.es/c/626df47ad)

  這也改進了 [`EXCEPT`](https://docs.postgresql.tw/19/reference/sql-commands/sql-select.md#except-zi-ju) 使用的雜湊集合運算，以及子計畫值的雜湊查找。
* 允許一般清理凍結某些頁面，即使這些頁面已全部可見 (Melanie Plageman) [§](https://postgr.es/c/052026c9b) [§](https://postgr.es/c/06eae9e62)

  這可以減少之後對整個關聯進行凍結的負擔。凍結的積極程度可以透過伺服器變數與個別資料表設定 [vacuum\_max\_eager\_freeze\_failure\_rate](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-vacuum.md#GUC-VACUUM-MAX-EAGER-FREEZE-FAILURE-RATE) 控制。先前清理在需要凍結之前，從不處理已全部可見的頁面。
* 新增伺服器變數 [vacuum\_truncate](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-vacuum.md#GUC-VACUUM-TRUNCATE)，用於控制 [VACUUM](https://docs.postgresql.tw/19/reference/sql-commands/sql-vacuum.md) 期間的檔案截斷 (Nathan Bossart, Gurjeet Singh) [§](https://postgr.es/c/0164a0f9e)

  先前已存在名稱與行為相同的儲存層級參數。
* 將伺服器變數 [effective\_io\_concurrency](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-resource.md#GUC-EFFECTIVE-IO-CONCURRENCY) 與 [maintenance\_io\_concurrency](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-resource.md#GUC-MAINTENANCE-IO-CONCURRENCY) 的預設值提高為 16 (Melanie Plageman) [§](https://postgr.es/c/ff79b5b2a) [§](https://postgr.es/c/cc6be07eb)

  這更準確地反映現代硬體的情況。

**E.6.3.1.4. 監控** [**#**](#RELEASE-18-MONITORING)

* 提高伺服器變數 [log\_connections](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-logging.md#GUC-LOG-CONNECTIONS) 的記錄細緻度 (Melanie Plageman) [§](https://postgr.es/c/9219093ca)

  此伺服器變數先前只是布林值，布林值仍受支援。
* 新增 `log_connections` 選項，用於回報各連線階段的持續時間 (Melanie Plageman) [§](https://postgr.es/c/18cd15e70)
* 新增 [log\_line\_prefix](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-logging.md#GUC-LOG-LINE-PREFIX) 跳脫序列 `%L`，用於輸出用戶端 IP 位址 (Greg Sabino Mullane) [§](https://postgr.es/c/3516ea768)
* 新增伺服器變數 [log\_lock\_failures](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-logging.md#GUC-LOG-LOCK-FAILURES)，用於記錄取得鎖定失敗的情況 (Yuki Seino, Fujii Masao) [§](https://postgr.es/c/6d376c3b0) [§](https://postgr.es/c/73bdcfab3)

  具體來說，它會回報 [`SELECT ... NOWAIT`](https://docs.postgresql.tw/19/reference/sql-commands/sql-select.md#suo-ding-zi-ju) 的鎖定失敗。
* 修改 [`pg_stat_all_tables`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats/monitoring-pg-stat-all-tables-view.md#monitoring-pg-stat-all-tables-view) 及其變體，以回報花費在 [VACUUM](https://docs.postgresql.tw/19/reference/sql-commands/sql-vacuum.md)、[ANALYZE](https://docs.postgresql.tw/19/reference/sql-commands/sql-analyze.md) 及其 [自動](https://docs.postgresql.tw/19/server-administration/maintenance/routine-vacuuming.md#autovacuum)版本上的時間 (Sami Imseih) [§](https://postgr.es/c/30a6ed0ce)

  新欄位為 `total_vacuum_time`、 `total_autovacuum_time`、 `total_analyze_time` 與 `total_autoanalyze_time`。
* 為 [VACUUM](https://docs.postgresql.tw/19/reference/sql-commands/sql-vacuum.md) 與 [ANALYZE](https://docs.postgresql.tw/19/reference/sql-commands/sql-analyze.md) 新增延遲時間回報 (Bertrand Drouvot, Nathan Bossart) [§](https://postgr.es/c/bb8dff999) [§](https://postgr.es/c/7720082ae)

  此資訊會出現在伺服器日誌、系統檢視表 [`pg_stat_progress_vacuum`](https://docs.postgresql.tw/19/server-administration/monitoring/progress-reporting/vacuum-progress-reporting.md#vacuum-progress-reporting) 與 [`pg_stat_progress_analyze`](https://docs.postgresql.tw/19/server-administration/monitoring/progress-reporting/analyze-progress-reporting.md#pg-stat-progress-analyze-view)， 以及 [VACUUM](https://docs.postgresql.tw/19/reference/sql-commands/sql-vacuum.md) 與 [ANALYZE](https://docs.postgresql.tw/19/reference/sql-commands/sql-analyze.md) 在 `VERBOSE` 模式下的輸出中；必須以伺服器變數 [track\_cost\_delay\_timing](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-statistics.md#GUC-TRACK-COST-DELAY-TIMING) 啟用追蹤。
* 在 `ANALYZE VERBOSE` 的輸出中新增 WAL、CPU 與平均讀取統計資訊 (Anthonin Bonnefoy) [§](https://postgr.es/c/4c1b4cdb8) [§](https://postgr.es/c/bb7775234)
* 在 `VACUUM`/`ANALYZE (VERBOSE)` 與 autovacuum 的日誌輸出中新增 WAL 緩衝區已滿的次數 (Bertrand Drouvot) [§](https://postgr.es/c/6a8a7ce47)
* 新增個別後端的 I/O 統計資訊回報 (Bertrand Drouvot) [§](https://postgr.es/c/9aea73fc6) [§](https://postgr.es/c/3f1db99bf)

  可以透過 [`pg_stat_get_backend_io()`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats.md#PG-STAT-GET-BACKEND-IO) 存取這些統計資訊。 可以透過 [`pg_stat_reset_backend_stats()`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats.md#monitoring-stats-funcs-table) 清除個別後端的 I/O 統計資訊。
* 新增 [`pg_stat_io`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats.md#monitoring-pg-stat-io-view) 欄位，以位元組為單位回報 I/O 活動 (Nazir Bilal Yavuz) [§](https://postgr.es/c/f92c854cf)

  新欄位為 `read_bytes`、 `write_bytes` 與 `extend_bytes`。原本恆等於 [`BLCKSZ`](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-preset.md#GUC-BLOCK-SIZE) 的 `op_bytes` 欄位已移除。
* 在 `pg_stat_io` 中新增 WAL I/O 活動的資料列 (Nazir Bilal Yavuz, Bertrand Drouvot, Michael Paquier) [§](https://postgr.es/c/a051e71e2) [§](https://postgr.es/c/4538bd3f1) [§](https://postgr.es/c/7f7f324eb)

  這包括 WAL 接收程序的活動，以及這類寫入的等待事件。
* 變更伺服器變數 [track\_wal\_io\_timing](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-statistics.md#GUC-TRACK-WAL-IO-TIMING)， 改為控制在 `pg_stat_io` 中追蹤 WAL 時間，而不是在 [`pg_stat_wal`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats/monitoring-pg-stat-wal-view.md#pg-stat-wal-view) 中 (Bertrand Drouvot) [§](https://postgr.es/c/6c349d83b)
* 從 `pg_stat_wal` 移除讀取／同步相關欄位 (Bertrand Drouvot) [§](https://postgr.es/c/2421e9a51) [§](https://postgr.es/c/6c349d83b)

  這會移除欄位 `wal_write`、 `wal_sync`、 `wal_write_time` 與 `wal_sync_time`。（原文此處寫作 read/sync，但移除的欄位實為寫入與同步相關。）
* 新增函式 [`pg_stat_get_backend_wal()`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats.md#PG-STAT-GET-BACKEND-WAL)， 用於傳回個別後端的 WAL 統計資訊 (Bertrand Drouvot) [§](https://postgr.es/c/76def4cdd)

  可以透過 [`pg_stat_reset_backend_stats()`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats.md#monitoring-stats-funcs-table) 清除個別後端的 WAL 統計資訊。
* 新增函式 [`pg_ls_summariesdir()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-admin/functions-admin-genfile.md#functions-admin-genfile-table)， 專門用於列出 [`PGDATA`](https://docs.postgresql.tw/19/internals/storage/storage-file-layout.md)/[`pg_wal/summaries`](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-wal.md#GUC-WAL-SUMMARY-KEEP-TIME) 的內容 (Yushi Ogiwara) [§](https://postgr.es/c/4e1fad378)
* 新增欄位 [`pg_stat_checkpointer`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats/monitoring-pg-stat-checkpointer-view.md#monitoring-pg-stat-checkpointer-view).`num_done`， 用於回報已完成的檢查點數量 (Anton A. Melnikov) [§](https://postgr.es/c/559efce1d)

  欄位 `num_timed` 與 `num_requested` 會同時計入已完成與已略過的檢查點。
* 新增欄位 `pg_stat_checkpointer`.`slru_written`， 用於回報已寫入的 SLRU 緩衝區 (Nitin Jadhav) [§](https://postgr.es/c/17cc5f666)

  此外，也修改檢查點的伺服器日誌訊息，分別回報共享緩衝區與 SLRU 緩衝區的值。
* 在 [`pg_stat_database`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats/monitoring-pg-stat-database-view.md#monitoring-pg-stat-database-view) 中新增欄位， 用於回報平行工作程序的活動 (Benoit Lobréau) [§](https://postgr.es/c/e7a9496de)

  新欄位為 `parallel_workers_to_launch` 與 `parallel_workers_launched`。
* 計算[查詢識別碼](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-statistics.md#GUC-COMPUTE-QUERY-ID)時，常數清單只考慮第一個與最後一個常數 (Dmitry Dolgov, Sami Imseih) [§](https://postgr.es/c/62d712ecf) [§](https://postgr.es/c/9fbd53dea) [§](https://postgr.es/c/c2da1a5d6)

  [pg\_stat\_statements](https://docs.postgresql.tw/19/appendixes/contrib/pgstatstatements.md) 會使用這種雜湊化計算（jumbling）。
* 調整查詢識別碼的計算方式，將使用相同關聯名稱的查詢歸為一組 (Michael Paquier, Sami Imseih) [§](https://postgr.es/c/787514b30)

  即使位於不同綱要中的資料表具有不同的欄位名稱，也是如此。
* 新增欄位 [`pg_backend_memory_contexts`](https://docs.postgresql.tw/19/internals/views/view-pg-backend-memory-contexts.md).`type`， 用於回報記憶體上下文的類型 (David Rowley) [§](https://postgr.es/c/12227a1d5)
* 新增欄位 `pg_backend_memory_contexts`.`path`， 用於顯示記憶體上下文的上層 (Melih Mutlu) [§](https://postgr.es/c/32d3ed816)

**E.6.3.1.5. 權限** [**#**](#RELEASE-18-PRIVILEGES)

* 新增函式 [`pg_get_acl()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-info/functions-info-object.md#functions-info-object-table)， 用於取得資料庫存取控制的詳細資訊 (Joel Jacobson) [§](https://postgr.es/c/4564f1ceb) [§](https://postgr.es/c/d898665bf)
* 新增函式 [`has_largeobject_privilege()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-info/functions-info-access.md#functions-info-access-table)， 用於檢查大型物件權限 (Yugo Nagata) [§](https://postgr.es/c/4eada203a)
* 允許 [ALTER DEFAULT PRIVILEGES](https://docs.postgresql.tw/19/reference/sql-commands/sql-alterdefaultprivileges.md) 定義大型物件的預設權限 (Takatsuka Haruka, Yugo Nagata, Laurenz Albe) [§](https://postgr.es/c/0d6c47766)
* 新增預先定義角色 [`pg_signal_autovacuum_worker`](https://docs.postgresql.tw/19/server-administration/user-manag/predefined-roles.md) (Kirill Reshke) [§](https://postgr.es/c/ccd38024b)

  這允許向 autovacuum 工作程序傳送訊號。

**E.6.3.1.6. 伺服器設定** [**#**](#RELEASE-18-SERVER-CONFIG)

* 新增對 [OAuth 認證方法](https://docs.postgresql.tw/19/server-administration/client-authentication/auth-oauth.md)的支援 (Jacob Champion, Daniel Gustafsson, Thomas Munro) [§](https://postgr.es/c/b3f0be788)

  這為 [`pg_hba.conf`](https://docs.postgresql.tw/19/server-administration/client-authentication/auth-pg-hba-conf.md) 新增 `oauth` 認證方法， 並新增 libpq 的 OAuth 選項、用於載入權杖驗證程式庫的伺服器變數 [oauth\_validator\_libraries](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-connection.md#GUC-OAUTH-VALIDATOR-LIBRARIES)，以及用於加入所需編譯時期程式庫的 configure 旗標 [`--with-libcurl`](https://docs.postgresql.tw/19/server-administration/installation/install-make.md#CONFIGURE-OPTION-WITH-LIBCURL)。
* 新增伺服器變數 [ssl\_tls13\_ciphers](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-connection.md#GUC-SSL-TLS13-CIPHERS)，允許指定多個以冒號分隔的 TLSv1.3 加密套件 (Erica Zhang, Daniel Gustafsson) [§](https://postgr.es/c/45188c2ea)
* 將伺服器變數 [ssl\_groups](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-connection.md#GUC-SSL-GROUPS) 的預設值改為包含橢圓曲線 X25519 (Daniel Gustafsson, Jacob Champion) [§](https://postgr.es/c/daa02c6bd)
* 將伺服器變數 `ssl_ecdh_curve` 更名為 [ssl\_groups](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-connection.md#GUC-SSL-GROUPS)，並允許指定多個以冒號分隔的 ECDH 曲線 (Erica Zhang, Daniel Gustafsson) [§](https://postgr.es/c/3d1ef3a15)

  舊名稱仍然可用。
* 將[取消請求金鑰](https://docs.postgresql.tw/19/the-sql-language/functions/functions-admin/functions-admin-signal.md#functions-admin-signal-table)改為 256 位元 (Heikki Linnakangas, Jelte Fennema-Nio) [§](https://postgr.es/c/a460251f0) [§](https://postgr.es/c/9d9b9d46f)

  只有在伺服器與用戶端都支援此版本引入的通訊協定（wire protocol）3.2 版時，才能這麼做。
* 新增伺服器變數 [autovacuum\_worker\_slots](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-vacuum.md#GUC-AUTOVACUUM-WORKER-SLOTS)， 用於指定背景工作程序的最大數量 (Nathan Bossart) [§](https://postgr.es/c/c758119e5)

  設定此變數後，可以在執行期間將 [autovacuum\_max\_workers](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-vacuum.md#GUC-AUTOVACUUM-MAX-WORKERS) 調整到不超過此最大值，而不需要重新啟動伺服器。
* 允許指定觸發 [autovacuum](https://docs.postgresql.tw/19/server-administration/maintenance/routine-vacuuming.md#autovacuum) 的固定死亡資料列數量 (Nathan Bossart, Frédéric Yhuel) [§](https://postgr.es/c/306dc520b)

  此伺服器變數為 [autovacuum\_vacuum\_max\_threshold](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-vacuum.md#GUC-AUTOVACUUM-VACUUM-MAX-THRESHOLD)。觸發條件仍會使用百分比。
* 變更伺服器變數 [max\_files\_per\_process](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-resource.md#GUC-MAX-FILES-PER-PROCESS)， 使其只限制後端開啟的檔案 (Andres Freund) [§](https://postgr.es/c/adb5f85fa)

  先前 postmaster 開啟的檔案也會計入此限制。
* 新增伺服器變數 [num\_os\_semaphores](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-preset.md#GUC-NUM-OS-SEMAPHORES)， 用於回報所需的號誌數量 (Nathan Bossart) [§](https://postgr.es/c/0dcaea569)

  這對作業系統設定很有用。
* 新增伺服器變數 [extension\_control\_path](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-client.md#GUC-EXTENSION-CONTROL-PATH)， 用於指定擴充功能控制檔的位置 (Peter Eisentraut, Matheus Alcantara) [§](https://postgr.es/c/4f7f7b037) [§](https://postgr.es/c/81eaaa2c4)

**E.6.3.1.7. 串流複寫與復原** [**#**](#RELEASE-18-REPLICATION)

* 允許使用伺服器變數 [idle\_replication\_slot\_timeout](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-replication.md#GUC-IDLE-REPLICATION-SLOT-TIMEOUT) 自動使非作用中的複寫插槽失效 (Nisha Moond, Bharath Rupireddy) [§](https://postgr.es/c/ac0e33136)
* 新增伺服器變數 [max\_active\_replication\_origins](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-replication.md#GUC-MAX-ACTIVE-REPLICATION-ORIGINS)，用於控制作用中複寫來源的最大數量 (Euler Taveira) [§](https://postgr.es/c/04ff636cb)

  此數量先前由 [max\_replication\_slots](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-replication.md#GUC-MAX-REPLICATION-SLOTS) 控制，但這個新設定可以在所需插槽較少的情況下，允許較多的複寫來源。

**E.6.3.1.8.** [**邏輯複寫**](https://docs.postgresql.tw/19/server-administration/logical-replication.md) [**#**](#RELEASE-18-LOGICAL)

* 允許以邏輯複寫方式複寫[產生欄位](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-GENERATED-STORED)的值 (Shubham Khanna, Vignesh C, Zhijie Hou, Shlok Kyal, Peter Smith) [§](https://postgr.es/c/745217a05) [§](https://postgr.es/c/7054186c4) [§](https://postgr.es/c/87ce27de6) [§](https://postgr.es/c/6252b1eaf)

  若發佈指定了欄位清單，則所有指定的欄位（無論是否為產生欄位）都會發佈。 若未指定欄位清單，則由發佈選項 `publish_generated_columns` 控制是否發佈產生欄位。先前產生欄位不會被複寫，訂閱者必須在可能的情況下自行計算其值；這對缺乏此能力的非 PostgreSQL 訂閱者特別有用。
* 將 [CREATE SUBSCRIPTION](https://docs.postgresql.tw/19/reference/sql-commands/sql-createsubscription.md) 的串流（streaming）選項預設值從 `off` 改為 `parallel` (Vignesh C) [§](https://postgr.es/c/1bf1140be)
* 允許 [ALTER SUBSCRIPTION](https://docs.postgresql.tw/19/reference/sql-commands/sql-altersubscription.md) 變更複寫插槽的兩階段提交行為 (Hayato Kuroda, Ajin Cherian, Amit Kapila, Zhijie Hou) [§](https://postgr.es/c/1462aad2e) [§](https://postgr.es/c/4868c96bc)
* 在套用邏輯複寫變更時記錄[衝突](https://docs.postgresql.tw/19/server-administration/high-availability/hot-standby.md#hot-standby-conflict) (Zhijie Hou, Nisha Moond) [§](https://postgr.es/c/9758174e2) [§](https://postgr.es/c/edcb71258) [§](https://postgr.es/c/640178c92) [§](https://postgr.es/c/6c2b5edec) [§](https://postgr.es/c/73eba5004)

  同時也在 [`pg_stat_subscription_stats`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats/monitoring-pg-stat-subscription-stats.md#monitoring-pg-stat-subscription-stats) 的新欄位中回報。

##### E.6.3.2. 公用程式命令 [#](#RELEASE-18-UTILITY)

* 允許[產生欄位](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-GENERATED-STORED)為虛擬欄位，並將其設為預設 (Peter Eisentraut, Jian He, Richard Guo, Dean Rasheed) [§](https://postgr.es/c/83ea6c540) [§](https://postgr.es/c/cdc168ad4) [§](https://postgr.es/c/1e4351af3)

  虛擬產生欄位會在讀取欄位時（而不是寫入時）產生其值。仍可以透過 `STORED` 選項指定寫入時產生的行為。
* 在 DML 查詢的 [`RETURNING`](https://docs.postgresql.tw/19/the-sql-language/dml/dml-returning.md) 中新增 `OLD`/`NEW` 支援 (Dean Rasheed) [§](https://postgr.es/c/80feb727c)

  先前 `RETURNING` 對 [INSERT](https://docs.postgresql.tw/19/reference/sql-commands/sql-insert.md) 與 [UPDATE](https://docs.postgresql.tw/19/reference/sql-commands/sql-update.md) 只傳回新值，對 [DELETE](https://docs.postgresql.tw/19/reference/sql-commands/sql-delete.md) 只傳回舊值；[MERGE](https://docs.postgresql.tw/19/reference/sql-commands/sql-merge.md) 則會傳回其內部所執行查詢的對應值。 這個新語法讓 `INSERT`/`UPDATE`/`DELETE`/`MERGE` 的 `RETURNING` 清單可以使用特殊別名 `old` 與 `new` 明確傳回舊值與新值。這些別名可以重新命名，以避免識別字衝突。
* 允許仿照現有的本機資料表建立外部資料表 (Zhang Mingli) [§](https://postgr.es/c/302cf1575)

  語法為 [`CREATE FOREIGN TABLE ... LIKE`](https://docs.postgresql.tw/19/reference/sql-commands/sql-createforeigntable.md)。
* 允許在[非確定性定序](https://docs.postgresql.tw/19/server-administration/charset/collation.md#COLLATION-NONDETERMINISTIC)下使用 [`LIKE`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-matching.md#functions-like) (Peter Eisentraut) [§](https://postgr.es/c/85b7efa1c)
* 允許在非確定性定序下使用文字位置搜尋函式 (Peter Eisentraut) [§](https://postgr.es/c/329304c90)

  這些過去會產生錯誤。
* 新增內建定序提供者 [`PG_UNICODE_FAST`](https://docs.postgresql.tw/19/server-administration/charset/locale.md#locale-providers) (Jeff Davis) [§](https://postgr.es/c/d3d098316)

  此語系支援大小寫對應，但依碼位順序排序，而非自然語言順序。
* 允許 [VACUUM](https://docs.postgresql.tw/19/reference/sql-commands/sql-vacuum.md) 與 [ANALYZE](https://docs.postgresql.tw/19/reference/sql-commands/sql-analyze.md) 處理分割資料表而不處理其子資料表 (Michael Harris) [§](https://postgr.es/c/62ddf7ee9)

  這由新的 `ONLY` 選項啟用。由於 autovacuum 不會處理分割資料表，只處理其子資料表，因此這很有用。
* 新增用於修改個別關聯與個別欄位最佳化器統計資訊的函式 (Corey Huinker) [§](https://postgr.es/c/e839c8ecc) [§](https://postgr.es/c/d32d14639) [§](https://postgr.es/c/650ab8aaf)

  這些函式為 [`pg_restore_relation_stats()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-admin/functions-admin-dbobject.md#functions-admin-statsmod)、 `pg_restore_attribute_stats()`、 `pg_clear_relation_stats()` 與 `pg_clear_attribute_stats()`。
* 新增伺服器變數 [file\_copy\_method](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-resource.md#GUC-FILE-COPY-METHOD)，用於控制檔案複製方式 (Nazir Bilal Yavuz) [§](https://postgr.es/c/f78ca6f3e)

  它控制 [`CREATE DATABASE ... STRATEGY=FILE_COPY`](https://docs.postgresql.tw/19/reference/sql-commands/sql-createdatabase.md) 與 [`ALTER DATABASE ... SET TABLESPACE`](https://docs.postgresql.tw/19/reference/sql-commands/sql-alterdatabase.md) 要使用一般的檔案複製，還是檔案系統的複製（clone）功能。

**E.6.3.2.1.** [**限制條件**](https://docs.postgresql.tw/19/the-sql-language/ddl/ddl-constraints.md) [**#**](#RELEASE-18-CONSTRAINTS)

* 允許指定不重疊的 [`PRIMARY KEY`](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-PRIMARY-KEY)、[`UNIQUE`](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-UNIQUE) 與 [外鍵](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-REFERENCES) 限制條件 (Paul A. Jungwirth) [§](https://postgr.es/c/fc0438b4e) [§](https://postgr.es/c/89f908a6d)

  對 `PRIMARY KEY` 與 `UNIQUE` 以 `WITHOUT OVERLAPS` 指定，對外鍵則以 `PERIOD` 指定，兩者都套用於最後一個指定的欄位。
* 允許將 [`CHECK`](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-CHECK) 與[外鍵](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-REFERENCES)限制條件指定為 `NOT ENFORCED` (Amul Sul) [§](https://postgr.es/c/ca87c415e) [§](https://postgr.es/c/eec0040c4)

  這也新增了欄位 [`pg_constraint`](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-constraint.md).`conenforced`。
* 要求[主鍵／外鍵](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-REFERENCES) 關係使用確定性定序，或使用相同的非確定性定序 (Peter Eisentraut) [§](https://postgr.es/c/9321d2fdf)

  若不符合這些要求，還原 [pg\_dump](https://docs.postgresql.tw/19/reference/reference-client/app-pgdump.md) 的傾印（[pg\_upgrade](https://docs.postgresql.tw/19/reference/reference-server/pgupgrade.md) 也會使用此方式）將會失敗； 必須先修改綱要，這些升級方式才能成功。
* 將欄位的 [`NOT NULL`](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtable.md#SQL-CREATETABLE-PARMS-NOT-NULL) 設定儲存在 [`pg_constraint`](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-constraint.md) 中 (Álvaro Herrera, Bernd Helmle) [§](https://postgr.es/c/14e87ffa5) [§](https://postgr.es/c/81ce602d4)

  這讓 `NOT NULL` 限制條件可以指定名稱。這也為外部資料表加入 `NOT NULL` 限制條件，並為本機資料表加入 `NOT NULL` 繼承控制。
* 允許 [ALTER TABLE](https://docs.postgresql.tw/19/reference/sql-commands/sql-altertable.md) 設定 `NOT NULL` 限制條件的 `NOT VALID` 屬性 (Rushabh Lathia, Jian He) [§](https://postgr.es/c/a379061a2)
* 允許修改 `NOT NULL` 限制條件的可繼承性 (Suraj Kharage, Álvaro Herrera) [§](https://postgr.es/c/f4e53e10b) [§](https://postgr.es/c/4a02af8b1)

  語法為 [`ALTER TABLE ... ALTER CONSTRAINT ... [NO] INHERIT`](https://docs.postgresql.tw/19/reference/sql-commands/sql-altertable.md)。
* 允許在分割資料表上使用 `NOT VALID` 外鍵限制條件 (Amul Sul) [§](https://postgr.es/c/b663b9436)
* 允許在分割資料表上以 `ONLY` [移除](https://docs.postgresql.tw/19/reference/sql-commands/sql-altertable.md#SQL-ALTERTABLE-DESC-DROP-CONSTRAINT)限制條件 (Álvaro Herrera) [§](https://postgr.es/c/4dea33ce7)

  先前這項操作被錯誤地禁止。

**E.6.3.2.2.** [**COPY**](https://docs.postgresql.tw/19/reference/sql-commands/sql-copy.md) [**#**](#RELEASE-18-COPY)

* 新增 `REJECT_LIMIT`，用於控制 `COPY FROM` 可以忽略的無效資料列數量 (Atsushi Torikoshi) [§](https://postgr.es/c/4ac2a9bec)

  此選項在 `ON_ERROR = 'ignore'` 時可用。
* 允許 `COPY TO` 從已填入資料的具體化檢視表複製資料列 (Jian He) [§](https://postgr.es/c/534874fac)
* 新增 `COPY` 的 `LOG_VERBOSITY` 層級 `silent`，用於抑制被忽略資料列的日誌輸出 (Atsushi Torikoshi) [§](https://postgr.es/c/e7834a1a2)

  這個新層級會在 `on_error = 'ignore'` 時，抑制被捨棄輸入資料列的輸出。
* 不再允許對外部資料表使用 `COPY FREEZE` (Nathan Bossart) [§](https://postgr.es/c/401a6956f)

  先前 `COPY` 可以執行，但 `FREEZE` 會被忽略，因此不再允許此命令。

**E.6.3.2.3.** [**EXPLAIN**](https://docs.postgresql.tw/19/reference/sql-commands/sql-explain.md) [**#**](#RELEASE-18-EXPLAIN)

* 在 `EXPLAIN ANALYZE` 中自動包含 `BUFFERS` 輸出 (Guillaume Lelarge, David Rowley) [§](https://postgr.es/c/c2a4078eb)
* 在 `EXPLAIN (WAL)` 的輸出中新增 WAL 緩衝區已滿的次數 (Bertrand Drouvot) [§](https://postgr.es/c/320545bfc)
* 在 `EXPLAIN ANALYZE` 中，回報每個索引掃描節點所使用的索引查找次數 (Peter Geoghegan) [§](https://postgr.es/c/0fbceae84)
* 修改 `EXPLAIN`，使其輸出帶小數的資料列數 (Ibrar Ahmed, Ilia Evdokimov, Robert Haas) [§](https://postgr.es/c/ddb17e387) [§](https://postgr.es/c/95dbd827f)
* 在 `EXPLAIN` 輸出中，為 `Material`、 `Window Aggregate` 與通用資料表運算式（CTE）節點加入記憶體與磁碟用量的詳細資訊 (David Rowley, Tatsuo Ishii) [§](https://postgr.es/c/1eff8279d) [§](https://postgr.es/c/53abb1e0e) [§](https://postgr.es/c/95d6e9af0) [§](https://postgr.es/c/40708acd6)
* 在 `EXPLAIN` 輸出中加入視窗函式引數的詳細資訊 (Tom Lane) [§](https://postgr.es/c/8b1b34254)
* 在 `EXPLAIN ANALYZE` 中加入 `Parallel Bitmap Heap Scan` 工作程序的快取統計資訊 (David Geier, Heikki Linnakangas, Donghang Lin, Alena Rybakina, David Rowley) [§](https://postgr.es/c/5a1e6df3b)
* 在 `EXPLAIN ANALYZE` 輸出中標示已停用的節點 (Robert Haas, David Rowley, Laurenz Albe) [§](https://postgr.es/c/c01743aa4) [§](https://postgr.es/c/161320b4b) [§](https://postgr.es/c/84b8fccbe)

##### E.6.3.3. 資料型別 [#](#RELEASE-18-DATATYPES)

* 改進 [Unicode](https://docs.postgresql.tw/19/server-administration/charset/collation.md#COLLATION-MANAGING-STANDARD) 完整大小寫對應與轉換 (Jeff Davis) [§](https://postgr.es/c/4e7f62bc3) [§](https://postgr.es/c/286a365b9)

  這新增了條件式大小寫對應與首字大寫（title case）對應的能力，並能將單一字元對應為多個字元。
* 允許將 [`jsonb`](https://docs.postgresql.tw/19/the-sql-language/datatype/datatype-json.md) 的 `null` 值轉型為純量型別的 `NULL` (Tom Lane) [§](https://postgr.es/c/a5579a90a)

  先前這類轉型會產生錯誤。
* 為 [`json{b}_strip_nulls`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-json/functions-json-processing.md#functions-json-processing-table) 新增選用參數， 允許移除值為 null 的陣列元素 (Florents Tselai) [§](https://postgr.es/c/4603903d2)
* 新增函式 [`array_sort()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-array.md#array-functions-table)， 用於排序陣列的第一個維度 (Junwang Zhao, Jian He) [§](https://postgr.es/c/6c12ae09f)
* 新增函式 [`array_reverse()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-array.md#array-functions-table)， 用於反轉陣列的第一個維度 (Aleksander Alekseev) [§](https://postgr.es/c/49d6c7d8d)
* 新增函式 [`reverse()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-string.md#functions-string-other)， 用於反轉 bytea 的位元組 (Aleksander Alekseev) [§](https://postgr.es/c/0697b2390)
* 允許在整數型別與 [`bytea`](https://docs.postgresql.tw/19/the-sql-language/datatype/datatype-binary.md) 之間轉型 (Aleksander Alekseev) [§](https://postgr.es/c/6da469bad)

  整數值會以二補數形式儲存為 `bytea` 值。
* 將 Unicode 資料更新至 [Unicode](https://docs.postgresql.tw/19/server-administration/charset/collation.md#COLLATION-MANAGING-STANDARD) 16.0.0 (Peter Eisentraut) [§](https://postgr.es/c/82a46cca9)
* 新增愛沙尼亞語的全文檢索[詞幹處理](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-dictionaries.md#textsearch-snowball-dictionary) (Tom Lane) [§](https://postgr.es/c/b464e51ab)
* 改進 [`XML`](https://docs.postgresql.tw/19/the-sql-language/datatype/datatype-xml.md) 錯誤碼，使其更貼近 SQL 標準 (Tom Lane) [§](https://postgr.es/c/cd838e200)

  這些錯誤會透過 [`SQLSTATE`](https://docs.postgresql.tw/19/appendixes/errcodes-appendix.md) 回報。

##### E.6.3.4. 函式 [#](#RELEASE-18-FUNCTIONS)

* 新增函式 [`casefold()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-string.md#functions-string-other)， 以支援更精細的不區分大小寫比對 (Jeff Davis) [§](https://postgr.es/c/bfc599206)

  這能進行更準確的比較，也就是說，某個字元可能有多個大寫或小寫的對應字元，或者大小寫轉換會改變字元數量。
* 允許對陣列與複合型別使用 [`MIN()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-aggregate.md#functions-aggregate-table)/[`MAX()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-aggregate.md#functions-aggregate-table) 彙總函式 (Aleksander Alekseev, Marat Buharov) [§](https://postgr.es/c/a0f1fce80) [§](https://postgr.es/c/2d24fd942)
* 為 [`EXTRACT()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-datetime.md#functions-datetime-extract) 新增 `WEEK` 選項 (Tom Lane) [§](https://postgr.es/c/6be39d77a)
* 改進 `EXTRACT(QUARTER ...)` 對負值的輸出 (Tom Lane) [§](https://postgr.es/c/6be39d77a)
* 為 [`to_number()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-formatting.md#functions-formatting-table) 新增羅馬數字支援 (Hunaid Sohail) [§](https://postgr.es/c/172e6b3ad)

  可透過 `RN` 樣式使用此功能。
* 新增 [`UUID`](https://docs.postgresql.tw/19/the-sql-language/datatype/datatype-uuid.md) 第 7 版產生函式 [`uuidv7()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-uuid.md#functions-uuid-table) (Andrey Borodin) [§](https://postgr.es/c/78c5e141e)

  這種 `UUID` 值可以依時間排序。另新增函式別名 [`uuidv4()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-uuid.md#functions-uuid-table)， 用於明確產生第 4 版 UUID。
* 新增函式 [`crc32()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-binarystring.md#functions-binarystring-other) 與 [`crc32c()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-binarystring.md#functions-binarystring-other)， 用於計算 CRC 值 (Aleksander Alekseev) [§](https://postgr.es/c/760162fed)
* 新增數學函式 [`gamma()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-math.md#functions-math-func-table) 與 [`lgamma()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-math.md#functions-math-func-table) (Dean Rasheed) [§](https://postgr.es/c/a3b6dfd41)
* 在 [PL/pgSQL](https://docs.postgresql.tw/19/server-programming/plpgsql.md) 中，允許以 `=>` 語法指定具名游標引數 (Pavel Stehule) [§](https://postgr.es/c/246dedc5d)

  先前只接受 `:=`。
* 允許 [`regexp_match[es]()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-matching/functions-posix-regexp.md#functions-posix-regexp)/[`regexp_like()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-matching/functions-posix-regexp.md#functions-posix-regexp)/[`regexp_replace()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-matching/functions-posix-regexp.md#functions-posix-regexp)/[`regexp_count()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-matching/functions-posix-regexp.md#functions-posix-regexp)/[`regexp_instr()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-matching/functions-posix-regexp.md#functions-posix-regexp)/[`regexp_substr()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-matching/functions-posix-regexp.md#functions-posix-regexp)/[`regexp_split_to_table()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-matching/functions-posix-regexp.md#functions-posix-regexp)/[`regexp_split_to_array()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-matching/functions-posix-regexp.md#functions-posix-regexp) 使用具名引數 (Jian He) [§](https://postgr.es/c/580f8727c)

##### E.6.3.5. [libpq](https://docs.postgresql.tw/19/client-interfaces/libpq.md) [#](#RELEASE-18-LIBPQ)

* 新增函式 [`PQfullProtocolVersion()`](https://docs.postgresql.tw/19/client-interfaces/libpq/libpq-status.md#libpq-pqfullprotocolversion)， 用於回報包含次要版本號的完整協定版本號 (Jacob Champion, Jelte Fennema-Nio) [§](https://postgr.es/c/cdb6b0fdb)
* 新增 libpq 連線[參數](https://docs.postgresql.tw/19/client-interfaces/libpq/libpq-connect/libpq-paramkeywords.md#libpq-connect-ssl-max-protocol-version) 與[環境變數](https://docs.postgresql.tw/19/client-interfaces/libpq/libpq-envars.md)， 用於指定連線可接受的最低與最高協定版本 (Jelte Fennema-Nio) [§](https://postgr.es/c/285613c60) [§](https://postgr.es/c/507034910)
* 將 [search\_path](https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-client.md#GUC-SEARCH-PATH) 的變更回報給用戶端 (Alexander Kukushkin, Jelte Fennema-Nio, Tomas Vondra) [§](https://postgr.es/c/28a1121fd) [§](https://postgr.es/c/0d06a7eac)
* 為所有訊息類型（包括認證）新增 [`PQtrace()`](https://docs.postgresql.tw/19/client-interfaces/libpq/libpq-control.md#libpq-pqtrace) 輸出 (Jelte Fennema-Nio) [§](https://postgr.es/c/ea92f3a0a) [§](https://postgr.es/c/a5c6b8f22) [§](https://postgr.es/c/b8b3f861f) [§](https://postgr.es/c/e87c14b19) [§](https://postgr.es/c/7adec2d5f)
* 新增 libpq 連線參數 [`sslkeylogfile`](https://docs.postgresql.tw/19/client-interfaces/libpq/libpq-connect/libpq-paramkeywords.md#libpq-connect-sslkeylogfile)， 用於傾印 SSL 金鑰資料 (Abhishek Chanda, Daniel Gustafsson) [§](https://postgr.es/c/2da74d8d6)

  這對除錯很有用。
* 修改部分 libpq 函式的簽章，改用 `int64_t` (Thomas Munro) [§](https://postgr.es/c/3c86223c9)

  這些函式先前使用 `pg_int64`，該型別現已棄用。

##### E.6.3.6. [psql](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md) [#](#RELEASE-18-PSQL)

* 允許 psql 剖析、繫結與關閉具名預備陳述式 (Anthonin Bonnefoy, Michael Paquier) [§](https://postgr.es/c/d55322b0d) [§](https://postgr.es/c/fc39b286a)

  這是透過新命令 [`\parse`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-META-COMMAND-PARSE)、 [`\bind_named`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-META-COMMAND-BIND-NAMED) 與 [`\close_prepared`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-META-COMMAND-CLOSE-PREPARED) 完成的。
* 新增可發出管線查詢的 psql 反斜線命令 (Anthonin Bonnefoy) [§](https://postgr.es/c/41625ab8e) [§](https://postgr.es/c/17caf6644) [§](https://postgr.es/c/2cce0fe44)

  新命令為 [`\startpipeline`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-META-COMMAND-PIPELINE)、 `\syncpipeline`、`\sendpipeline`、 `\endpipeline`、`\flushrequest`、 `\flush` 與 `\getresults`。
* 允許在 psql 提示字元中加入管線狀態，並新增相關的狀態變數 (Anthonin Bonnefoy) [§](https://postgr.es/c/3ce357584)

  新的提示字元代碼為 `%P`， 新的 psql 變數為 [`PIPELINE_SYNC_COUNT`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-VARIABLES-PIPELINE-SYNC-COUNT)、 [`PIPELINE_COMMAND_COUNT`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-VARIABLES-PIPELINE-COMMAND-COUNT) 與 [`PIPELINE_RESULT_COUNT`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-VARIABLES-PIPELINE-RESULT-COUNT)。
* 允許在 psql 提示字元中加入連線服務名稱，或透過 psql 變數存取該名稱 (Michael Banck) [§](https://postgr.es/c/477728b5d)
* 新增讓所有清單命令使用展開模式（expanded mode）的 psql 選項 (Dean Rasheed) [§](https://postgr.es/c/00f4c2959)

  加上反斜線命令後綴 `x` 即可啟用。
* 變更 psql 的 [`\conninfo`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-META-COMMAND-CONNINFO)，改用表格格式並包含更多資訊 (Álvaro Herrera, Maiquel Grassi, Hunaid Sohail) [§](https://postgr.es/c/bba2fbc62)
* 在 psql 的 [`\df+`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-META-COMMAND-DF-LC)、 `\do+`、`\dAo+` 與 `\dC+` 輸出中加入函式的 leakproof 標示 (Yugo Nagata) [§](https://postgr.es/c/2355e5111)
* 在 [`\dP+`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-META-COMMAND-DP-UC) 中加入分割關聯的存取方法詳細資訊 (Justin Pryzby) [§](https://postgr.es/c/978f38c77)
* 在 psql [`\dx`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-META-COMMAND-DX-LC) 的擴充功能輸出中加入 `default_version` (Magnus Hagander) [§](https://postgr.es/c/d696406a9)
* 新增 psql 變數 [`WATCH_INTERVAL`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-VARIABLES-WATCH-INTERVAL)，用於設定 [`\watch`](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md#APP-PSQL-META-COMMAND-WATCH) 的預設等待時間 (Daniel Gustafsson) [§](https://postgr.es/c/1a759c832)

##### E.6.3.7. 伺服器應用程式 [#](#RELEASE-18-SERVER-APPS)

* 將 [initdb](https://docs.postgresql.tw/19/reference/reference-server/app-initdb.md) 改為預設啟用檢查碼 (Greg Sabino Mullane) [§](https://postgr.es/c/983a588e0) [§](https://postgr.es/c/04bec894a)

  新的 initdb 選項 `--no-data-checksums` 可停用檢查碼。
* 新增 initdb 選項 `--no-sync-data-files`，避免同步堆積／索引檔案 (Nathan Bossart) [§](https://postgr.es/c/cf131fa94)

  initdb 選項 `--no-sync` 仍可用來避免同步任何檔案。
* 新增 [vacuumdb](https://docs.postgresql.tw/19/reference/reference-client/app-vacuumdb.md) 選項 `--missing-stats-only`，只計算缺少的最佳化器統計資訊 (Corey Huinker, Nathan Bossart) [§](https://postgr.es/c/edba754f0) [§](https://postgr.es/c/987910502)

  此選項只能由超級使用者執行，而且只能搭配選項 `--analyze-only` 與 `--analyze-in-stages` 使用。
* 新增 [pg\_combinebackup](https://docs.postgresql.tw/19/reference/reference-client/app-pgcombinebackup.md) 選項 `-k`/`--link`，以啟用硬連結 (Israel Barth Rubio, Robert Haas) [§](https://postgr.es/c/99aeb8470)

  只有部分檔案可以使用硬連結。若各個備份將被獨立使用，則不應使用此選項。
* 允許 [pg\_verifybackup](https://docs.postgresql.tw/19/reference/reference-client/app-pgverifybackup.md) 驗證 tar 格式的備份 (Amul Sul) [§](https://postgr.es/c/8dfd31290)
* 若 [pg\_rewind](https://docs.postgresql.tw/19/reference/reference-server/app-pgrewind.md) 的 `--source-server` 指定了資料庫名稱，則在 `--write-recovery-conf` 的輸出中使用該名稱 (Masahiko Sawada) [§](https://postgr.es/c/4ecdd4110)
* 新增 [pg\_resetwal](https://docs.postgresql.tw/19/reference/reference-server/app-pgresetwal.md) 選項 `--char-signedness`，用於變更預設的 `char` 有號性 (Masahiko Sawada) [§](https://postgr.es/c/30666d185)

**E.6.3.7.1.** [**pg\_dump**](https://docs.postgresql.tw/19/reference/reference-client/app-pgdump.md)**/**[**pg\_dumpall**](https://docs.postgresql.tw/19/reference/reference-client/app-pg-dumpall.md)**/**[**pg\_restore**](https://docs.postgresql.tw/19/reference/reference-client/app-pgrestore.md) [**#**](#RELEASE-18-PGDUMP)

* 新增 [pg\_dump](https://docs.postgresql.tw/19/reference/reference-client/app-pgdump.md) 選項 `--statistics` (Jeff Davis) [§](https://postgr.es/c/bde2fb797) [§](https://postgr.es/c/a3e8dc143)
* 新增 pg\_dump 與 [pg\_dumpall](https://docs.postgresql.tw/19/reference/reference-client/app-pg-dumpall.md) 選項 `--sequence-data`， 用於傾印通常會被排除的序列資料 (Nathan Bossart) [§](https://postgr.es/c/9c49f0e8c) [§](https://postgr.es/c/acea3fc49)
* 新增 [pg\_dump](https://docs.postgresql.tw/19/reference/reference-client/app-pgdump.md)、[pg\_dumpall](https://docs.postgresql.tw/19/reference/reference-client/app-pg-dumpall.md) 與 [pg\_restore](https://docs.postgresql.tw/19/reference/reference-client/app-pgrestore.md) 選項 `--statistics-only`、`--no-statistics`、 `--no-data` 與 `--no-schema` (Corey Huinker, Jeff Davis) [§](https://postgr.es/c/1fd1bd871)
* 在 [pg\_dump](https://docs.postgresql.tw/19/reference/reference-client/app-pgdump.md)、 [pg\_dumpall](https://docs.postgresql.tw/19/reference/reference-client/app-pg-dumpall.md)、[pg\_restore](https://docs.postgresql.tw/19/reference/reference-client/app-pgrestore.md) 中新增選項 `--no-policies`，用於停用資料列層級安全原則的處理 (Nikolay Samokhvalov) [§](https://postgr.es/c/cd3c45125)

  這對遷移到原則不同的系統很有用。

**E.6.3.7.2.** [**pg\_upgrade**](https://docs.postgresql.tw/19/reference/reference-server/pgupgrade.md) [**#**](#RELEASE-18-PGUPGRADE)

* 允許 pg\_upgrade 保留最佳化器統計資訊 (Corey Huinker, Jeff Davis, Nathan Bossart) [§](https://postgr.es/c/1fd1bd871) [§](https://postgr.es/c/c9d502eb6) [§](https://postgr.es/c/d5f1b6a75) [§](https://postgr.es/c/1fd1bd871)

  擴充統計資訊不會被保留。另外也新增 pg\_upgrade 選項 `--no-statistics`，用於停用統計資訊的保留。
* 允許 pg\_upgrade 平行處理資料庫檢查 (Nathan Bossart) [§](https://postgr.es/c/40e2e5e92) [§](https://postgr.es/c/6d3d2e8e5) [§](https://postgr.es/c/7baa36de5) [§](https://postgr.es/c/46cad8b31) [§](https://postgr.es/c/6ab8f27bc) [§](https://postgr.es/c/bbf83cab9) [§](https://postgr.es/c/9db3018cf) [§](https://postgr.es/c/c34eabfbb) [§](https://postgr.es/c/cf2f82a37) [§](https://postgr.es/c/f93f5f7b9) [§](https://postgr.es/c/c880cf258)

  這由既有的 `--jobs` 選項控制。
* 新增 pg\_upgrade 選項 `--swap`，以交換目錄的方式取代複製、clone 或連結檔案 (Nathan Bossart) [§](https://postgr.es/c/626d7236b)

  此模式可能是最快的。
* 新增 pg\_upgrade 選項 `--set-char-signedness`，用於設定新叢集預設的 `char` 有號性 (Masahiko Sawada) [§](https://postgr.es/c/a8238f87f) [§](https://postgr.es/c/1aab68059)

  這是為了處理 PostgreSQL 18 之前版本的叢集預設 CPU 有號性與新叢集不一致的情況。

**E.6.3.7.3. 邏輯複寫應用程式** [**#**](#RELEASE-18-LOGICALREP-APP)

* 新增 [pg\_createsubscriber](https://docs.postgresql.tw/19/reference/reference-server/app-pgcreatesubscriber.md) 選項 `--all`，為所有資料庫建立邏輯複本 (Shubham Khanna) [§](https://postgr.es/c/fb2ea12f4)
* 新增 pg\_createsubscriber 選項 `--clean`，用於移除發佈 (Shubham Khanna) [§](https://postgr.es/c/e5aeed4b8) [§](https://postgr.es/c/60dda7bbc)
* 新增 pg\_createsubscriber 選項 `--enable-two-phase`，用於啟用預備交易 (Shubham Khanna) [§](https://postgr.es/c/e117cfb2f)
* 新增 [pg\_recvlogical](https://docs.postgresql.tw/19/reference/reference-client/app-pgrecvlogical.md) 選項 `--enable-failover`，用於指定容錯移轉插槽 (Hayato Kuroda) [§](https://postgr.es/c/cf2655a90)

  另外也新增選項 `--enable-two-phase` 作為 `--two-phase` 的同義選項，並棄用後者。
* 允許 pg\_recvlogical 的 `--drop-slot` 在不指定 `--dbname` 的情況下運作 (Hayato Kuroda) [§](https://postgr.es/c/c68100aa4)

##### E.6.3.8. 原始碼 [#](#RELEASE-18-SOURCE-CODE)

* 將[注入點](https://docs.postgresql.tw/19/server-programming/extend/xfunc-c.md#xfunc-addin-injection-points)的載入與執行分開 (Michael Paquier, Heikki Linnakangas) [§](https://postgr.es/c/4b211003e) [§](https://postgr.es/c/a0a5869a8)

  現在可以透過 [`INJECTION_POINT_LOAD()`](https://docs.postgresql.tw/19/server-programming/extend/xfunc-c.md#xfunc-addin-injection-points) 建立注入點但不執行， 並可以透過 [`INJECTION_POINT_CACHED()`](https://docs.postgresql.tw/19/server-programming/extend/xfunc-c.md#xfunc-addin-injection-points) 執行這類注入點。
* 支援注入點的執行期引數 (Michael Paquier) [§](https://postgr.es/c/371f2db8b)
* 允許使用 [`IS_INJECTION_POINT_ATTACHED()`](https://docs.postgresql.tw/19/server-programming/extend/xfunc-c.md#xfunc-addin-injection-points) 撰寫內嵌的注入點測試程式碼 (Heikki Linnakangas) [§](https://postgr.es/c/20e0e7da9)
* 使用 SIMD（單一指令多重資料）提升處理長 [`JSON`](https://docs.postgresql.tw/19/the-sql-language/datatype/datatype-json.md) 字串的效能 (David Rowley) [§](https://postgr.es/c/ca6fde922)
* 使用 x86 AVX-512 指令加快 CRC32C 計算 (Raghuveer Devulapalli, Paul Amonson) [§](https://postgr.es/c/3c6e8c123)
* 新增用於 popcount（整數位元計數）的 ARM Neon 與 SVE CPU 內建函式（intrinsics） (Chiranmoy Bhattacharya, Devanga Susmitha, Rama Malladi) [§](https://postgr.es/c/6be53c276) [§](https://postgr.es/c/519338ace)
* 提高 numeric 乘法與除法的速度 (Joel Jacobson, Dean Rasheed) [§](https://postgr.es/c/ca481d3c9) [§](https://postgr.es/c/c4e44224c) [§](https://postgr.es/c/8dc28d7eb) [§](https://postgr.es/c/9428c001f)
* 新增 configure 選項 [`--with-libnuma`](https://docs.postgresql.tw/19/server-administration/installation/install-make.md#CONFIGURE-OPTION-WITH-LIBNUMA)， 以啟用 NUMA 感知 (Jakub Wartak, Bertrand Drouvot) [§](https://postgr.es/c/65c298f61) [§](https://postgr.es/c/8cc139bec) [§](https://postgr.es/c/ba2a3c230)

  函式 [`pg_numa_available()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-info/functions-info-session.md#functions-info-session-table) 會回報 NUMA 感知的狀態，系統檢視表 [`pg_shmem_allocations_numa`](https://docs.postgresql.tw/19/internals/views/view-pg-shmem-allocations-numa.md) 與 [`pg_buffercache_numa`](https://docs.postgresql.tw/19/appendixes/contrib/pgbuffercache/pgbuffercache-pg-buffercache-numa.md#pgbuffercache-pg-buffercache-numa) 則會回報共享記憶體在各 NUMA 節點間的分布。
* 為 [`pg_index`](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-index.md) 新增 [TOAST](https://docs.postgresql.tw/19/internals/storage/storage-toast.md) 資料表， 以支援非常大的運算式索引 (Nathan Bossart) [§](https://postgr.es/c/b52c4fc3c)
* 移除欄位 [`pg_attribute`](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-attribute.md).`attcacheoff` (David Rowley) [§](https://postgr.es/c/02a8d0c45)
* 新增欄位 [`pg_class`](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-class.md).`relallfrozen` (Melanie Plageman) [§](https://postgr.es/c/99f8f3fbb)
* 在索引存取方法 API 中新增 [`amgettreeheight`](https://docs.postgresql.tw/19/internals/indexam.md)、 `amconsistentequality` 與 `amconsistentordering` (Mark Dilger) [§](https://postgr.es/c/56fead44d) [§](https://postgr.es/c/af4002b38)
* 新增 GiST 支援函式 [`stratnum()`](https://docs.postgresql.tw/19/internals/indextypes/gist.md#gist-extensibility) (Paul A. Jungwirth) [§](https://postgr.es/c/7406ab623)
* 在 [pg\_controldata](https://docs.postgresql.tw/19/reference/reference-server/app-pgcontroldata.md) 中記錄 `char` 的預設 CPU 有號性 (Masahiko Sawada) [§](https://postgr.es/c/44fe30fda)
* 在 [PL/Python](https://docs.postgresql.tw/19/server-programming/plpython.md) 中新增對 Python「Limited API」的支援 (Peter Eisentraut) [§](https://postgr.es/c/72a3d0462) [§](https://postgr.es/c/0793ab810)

  這有助於避免 Python 3.x 版本不一致所造成的問題。
* 將支援的最低 Python 版本改為 3.6.8 (Jacob Champion) [§](https://postgr.es/c/45363fca6)
* 移除對 1.1.1 之前 OpenSSL 版本的支援 (Daniel Gustafsson) [§](https://postgr.es/c/a70e01d43) [§](https://postgr.es/c/6c66b7443)
* 若啟用 LLVM，則要求 14 以上的版本 (Thomas Munro) [§](https://postgr.es/c/972c2cd28)
* 新增巨集 [`PG_MODULE_MAGIC_EXT`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-info.md)， 讓擴充功能可以回報其名稱與版本 (Andrei Lepikhov) [§](https://postgr.es/c/9324c8c58)

  可以透過新函式 [`pg_get_loaded_modules()`](https://docs.postgresql.tw/19/the-sql-language/functions/functions-info/functions-info-session.md#functions-info-session-table) 存取此資訊。
* 在文件中說明 [`SPI_connect()`](https://docs.postgresql.tw/19/server-programming/spi/spi-interface/spi-spi-connect.md)/[`SPI_connect_ext()`](https://docs.postgresql.tw/19/server-programming/spi/spi-interface/spi-spi-connect.md) 一律傳回成功（`SPI_OK_CONNECT`） (Stepan Neretin) [§](https://postgr.es/c/218527d01)

  錯誤一律透過 `ereport()` 回報。
* 新增關於 API 與 ABI 相容性的[文件章節](https://docs.postgresql.tw/19/server-programming/extend/xfunc-c.md#xfunc-api-abi-stability-guidance) (David Wheeler, Peter Eisentraut) [§](https://postgr.es/c/e54a42ac9)
* 移除 Windows 上 Meson 建置的實驗性標示 (Aleksander Alekseev) [§](https://postgr.es/c/5afaba629)
* 移除 configure 選項 `--disable-spinlocks` 與 `--disable-atomics` (Thomas Munro) [§](https://postgr.es/c/e25626677) [§](https://postgr.es/c/813852613)

  現在必須支援 32 位元原子操作。
* 移除對 HPPA/PA-RISC 架構的支援 (Tom Lane) [§](https://postgr.es/c/edadeb071)

##### E.6.3.9. 附加模組 [#](#RELEASE-18-MODULES)

* 新增擴充功能 [pg\_logicalinspect](https://docs.postgresql.tw/19/appendixes/contrib/pglogicalinspect.md)，用於檢視邏輯快照 (Bertrand Drouvot) [§](https://postgr.es/c/7cdfeee32)
* 新增擴充功能 [pg\_overexplain](https://docs.postgresql.tw/19/appendixes/contrib/pgoverexplain.md)，在 [`EXPLAIN`](https://docs.postgresql.tw/19/reference/sql-commands/sql-explain.md) 輸出中加入除錯細節 (Robert Haas) [§](https://postgr.es/c/8d5ceb113)
* 為 [`postgres_fdw_get_connections()`](https://docs.postgresql.tw/19/appendixes/contrib/postgres-fdw/postgres-fdw-functions.md#postgres-fdw-functions) 新增輸出欄位 (Hayato Kuroda, Sagar Dilip Shedge) [§](https://postgr.es/c/c297a47c5) [§](https://postgr.es/c/857df3cef) [§](https://postgr.es/c/4f08ab554) [§](https://postgr.es/c/fe186bda7)

  新輸出欄位 `used_in_xact` 表示該外部資料包裝器是否正被目前交易使用， `closed` 表示其是否已關閉， `user_name` 表示使用者名稱， `remote_backend_pid` 則表示遠端後端程序的識別碼。
* 允許將來自用戶端的 [SCRAM](https://docs.postgresql.tw/19/server-administration/client-authentication/auth-password.md) 認證傳遞給 [postgres\_fdw](https://docs.postgresql.tw/19/appendixes/contrib/postgres-fdw.md) 伺服器 (Matheus Alcantara, Peter Eisentraut) [§](https://postgr.es/c/761c79508)

  這可以避免在資料庫中儲存 postgres\_fdw 的認證資訊，並由 postgres\_fdw 連線選項 [`use_scram_passthrough`](https://docs.postgresql.tw/19/appendixes/contrib/postgres-fdw.md#POSTGRES-FDW-OPTION-USE-SCRAM-PASSTHROUGH) 啟用。libpq 使用新的連線參數 [scram\_client\_key](https://docs.postgresql.tw/19/client-interfaces/libpq/libpq-connect/libpq-paramkeywords.md#libpq-connect-scram-client-key) 與 [scram\_server\_key](https://docs.postgresql.tw/19/client-interfaces/libpq/libpq-connect/libpq-paramkeywords.md#libpq-connect-scram-server-key)。
* 允許將來自用戶端的 SCRAM 認證傳遞給 [dblink](https://docs.postgresql.tw/19/appendixes/contrib/dblink.md) 伺服器 (Matheus Alcantara) [§](https://postgr.es/c/3642df265)
* 為 [file\_fdw](https://docs.postgresql.tw/19/appendixes/contrib/file-fdw.md) 新增 `on_error` 與 `log_verbosity` 選項 (Atsushi Torikoshi) [§](https://postgr.es/c/a1c4c8a9e)

  這些選項控制 file\_fdw 如何處理及回報檔案中的無效資料列。
* 新增 `reject_limit`，用於控制 file\_fdw 可以忽略的無效資料列數量 (Atsushi Torikoshi) [§](https://postgr.es/c/6c8f67032)

  此選項在 `ON_ERROR = 'ignore'` 時有效。
* 為 [passwordcheck](https://docs.postgresql.tw/19/appendixes/contrib/passwordcheck.md) 新增可設定的變數 `min_password_length` (Emanuele Musella, Maurizio Boriani) [§](https://postgr.es/c/f7e1b3828)

  此變數控制密碼的最小長度。
* 讓 [pgbench](https://docs.postgresql.tw/19/reference/reference-client/pgbench.md) 在個別腳本的報告中回報失敗、重試或略過的交易數量 (Yugo Nagata) [§](https://postgr.es/c/cae0f3c40)
* 新增 [isn](https://docs.postgresql.tw/19/appendixes/contrib/isn.md) 伺服器變數 `weak`， 用於控制是否接受無效的檢查位數（check digit） (Viktor Holmberg) [§](https://postgr.es/c/448904423)

  先前只能透過函式 [`isn_weak()`](https://docs.postgresql.tw/19/appendixes/contrib/isn/isn-funcs-ops.md#isn-functions) 控制。
* 允許先將值排序，以加快 [btree\_gist](https://docs.postgresql.tw/19/appendixes/contrib/btree-gist.md) 索引的建立 (Bernd Helmle, Andrey Borodin) [§](https://postgr.es/c/e4309f73f)
* 新增 [amcheck](https://docs.postgresql.tw/19/appendixes/contrib/amcheck.md) 檢查函式 [`gin_index_check()`](https://docs.postgresql.tw/19/appendixes/contrib/amcheck.md#amcheck-functions)， 用於驗證 `GIN` 索引 (Grigory Kryachko, Heikki Linnakangas, Andrey Borodin) [§](https://postgr.es/c/14ffaece0)
* 新增函式 [`pg_buffercache_evict_relation()`](https://docs.postgresql.tw/19/appendixes/contrib/pgbuffercache.md#pgbuffercache-pg-buffercache-evict-relation) 與 [`pg_buffercache_evict_all()`](https://docs.postgresql.tw/19/appendixes/contrib/pgbuffercache.md#pgbuffercache-pg-buffercache-evict-all)， 用於逐出未被釘住（unpinned）的共享緩衝區 (Nazir Bilal Yavuz) [§](https://postgr.es/c/dcf7e1697)

  既有函式 [`pg_buffercache_evict()`](https://docs.postgresql.tw/19/appendixes/contrib/pgbuffercache.md#pgbuffercache-pg-buffercache-evict) 現在會傳回緩衝區的刷寫狀態。
* 允許擴充功能安裝自訂的 [EXPLAIN](https://docs.postgresql.tw/19/reference/sql-commands/sql-explain.md) 選項 (Robert Haas, Sami Imseih) [§](https://postgr.es/c/c65bc2e1d) [§](https://postgr.es/c/4fd02bf7c) [§](https://postgr.es/c/50ba65e73)
* 允許擴充功能使用伺服器的累計統計資訊 API (Michael Paquier) [§](https://postgr.es/c/7949d9594) [§](https://postgr.es/c/2eff9e678)

**E.6.3.9.1.** [**pg\_stat\_statements**](https://docs.postgresql.tw/19/appendixes/contrib/pgstatstatements.md) [**#**](#RELEASE-18-PGSTATSTATEMENTS)

* 允許 pg\_stat\_statements 追蹤 [CREATE TABLE AS](https://docs.postgresql.tw/19/reference/sql-commands/sql-createtableas.md) 與 [DECLARE](https://docs.postgresql.tw/19/reference/sql-commands/sql-declare.md) 的查詢 (Anthonin Bonnefoy) [§](https://postgr.es/c/6b652e6ce)

  現在也會為這些查詢指派查詢識別碼。
* 允許在 pg\_stat\_statements 中將 [SET](https://docs.postgresql.tw/19/reference/sql-commands/sql-set.md) 的值參數化 (Greg Sabino Mullane, Michael Paquier) [§](https://postgr.es/c/dc6851596)

  這可以減少常數不同的 `SET` 陳述式所造成的膨脹。
* 新增 [`pg_stat_statements`](https://docs.postgresql.tw/19/appendixes/contrib/pgstatstatements/pgstatstatements-pg-stat-statements.md#pgstatstatements-pg-stat-statements) 欄位，用於回報平行活動 (Guillaume Lelarge) [§](https://postgr.es/c/cf54a2c00)

  新欄位為 `parallel_workers_to_launch` 與 `parallel_workers_launched`。
* 新增 `pg_stat_statements`.`wal_buffers_full`， 用於回報 WAL 緩衝區已滿的次數 (Bertrand Drouvot) [§](https://postgr.es/c/ce5bcc4a9)

**E.6.3.9.2.** [**pgcrypto**](https://docs.postgresql.tw/19/appendixes/contrib/pgcrypto.md) [**#**](#RELEASE-18-PGCRYPTO)

* 新增 pgcrypto 演算法 [`sha256crypt`](https://docs.postgresql.tw/19/appendixes/contrib/pgcrypto/pgcrypto-password-hashing-funcs.md#pgcrypto-crypt-algorithms) 與 [`sha512crypt`](https://docs.postgresql.tw/19/appendixes/contrib/pgcrypto/pgcrypto-password-hashing-funcs.md#pgcrypto-crypt-algorithms) (Bernd Helmle) [§](https://postgr.es/c/749a9e20c)
* 在 pgcrypto 的加密與解密中新增 [CFB](https://docs.postgresql.tw/19/appendixes/contrib/pgcrypto.md#pgcrypto-raw-enc-funcs) 模式 (Umar Hayat) [§](https://postgr.es/c/9ad1b3d01)
* 新增函式 [`fips_mode()`](https://docs.postgresql.tw/19/appendixes/contrib/pgcrypto.md#pgcrypto-openssl-support-funcs)， 用於回報伺服器的 FIPS 模式 (Daniel Gustafsson) [§](https://postgr.es/c/924d89a35)
* 新增 pgcrypto 伺服器變數 [`builtin_crypto_enabled`](https://docs.postgresql.tw/19/appendixes/contrib/pgcrypto.md#PGCRYPTO-CONFIGURATION-PARAMETERS-BUILTIN_CRYPTO_ENABLED)， 允許停用內建的非 FIPS 模式加密函式 (Daniel Gustafsson, Joe Conway) [§](https://postgr.es/c/035f99cbe)

  這對確保 FIPS 模式的行為很有用。

#### E.6.4. 致謝 [#](#release-18-acknowledgements) <a href="#release-18-acknowledgements" id="release-18-acknowledgements"></a>

下列人士（依字母順序排列）以修補程式作者、提交者、審閱者、測試者或問題回報者的身分，對此版本做出貢獻。

| Abhishek Chanda             |
| --------------------------- |
| Adam Guo                    |
| Adam Rauch                  |
| Aidar Imamov                |
| Ajin Cherian                |
| Alastair Turner             |
| Alec Cozens                 |
| Aleksander Alekseev         |
| Alena Rybakina              |
| Alex Friedman               |
| Alex Richman                |
| Alexander Alehin            |
| Alexander Borisov           |
| Alexander Korotkov          |
| Alexander Kozhemyakin       |
| Alexander Kukushkin         |
| Alexander Kuzmenkov         |
| Alexander Kuznetsov         |
| Alexander Lakhin            |
| Alexander Pyhalov           |
| Alexandra Wang              |
| Alexey Dvoichenkov          |
| Alexey Makhmutov            |
| Alexey Shishkin             |
| Ali Akbar                   |
| Álvaro Herrera              |
| Álvaro Mongil               |
| Amit Kapila                 |
| Amit Langote                |
| Amul Sul                    |
| Andreas Karlsson            |
| Andreas Scherbaum           |
| Andreas Ulbrich             |
| Andrei Lepikhov             |
| Andres Freund               |
| Andrew                      |
| Andrew Bille                |
| Andrew Dunstan              |
| Andrew Jackson              |
| Andrew Kane                 |
| Andrew Watkins              |
| Andrey Borodin              |
| Andrey Chudnovsky           |
| Andrey Rachitskiy           |
| Andrey Rudometov            |
| Andy Alsup                  |
| Andy Fan                    |
| Anthonin Bonnefoy           |
| Anthony Hsu                 |
| Anthony Leung               |
| Anton Melnikov              |
| Anton Voloshin              |
| Antonin Houska              |
| Antti Lampinen              |
| Arseniy Mukhin              |
| Artur Zakirov               |
| Arun Thirupathi             |
| Ashutosh Bapat              |
| Asphator                    |
| Atsushi Torikoshi           |
| Avi Weinberg                |
| Aya Iwata                   |
| Ayush Tiwari                |
| Ayush Vatsa                 |
| Bastien Roucariès           |
| Ben Peachey Higdon          |
| Benoit Lobréau              |
| Bernd Helmle                |
| Bernd Reiß                  |
| Bernhard Wiedemann          |
| Bertrand Drouvot            |
| Bertrand Mamasam            |
| Bharath Rupireddy           |
| Bogdan Grigorenko           |
| Boyu Yang                   |
| Braulio Fdo Gonzalez        |
| Bruce Momjian               |
| Bykov Ivan                  |
| Cameron Vogt                |
| Cary Huang                  |
| Cédric Villemain            |
| Cees van Zeeland            |
| ChangAo Chen                |
| Chao Li                     |
| Chapman Flack               |
| Charles Samborski           |
| Chengwen Wu                 |
| Chengxi Sun                 |
| Chiranmoy Bhattacharya      |
| Chris Gooch                 |
| Christian Charukiewicz      |
| Christoph Berg              |
| Christophe Courtois         |
| Christopher Inokuchi        |
| Clemens Ruck                |
| Corey Huinker               |
| Craig Milhiser              |
| Crisp Lee                   |
| Dagfinn Ilmari Mannsåker    |
| Daniel Elishakov            |
| Daniel Gustafsson           |
| Daniel Vérité               |
| Daniel Westermann           |
| Daniele Varrazzo            |
| Daniil Davydov              |
| Daria Shanina               |
| Dave Cramer                 |
| Dave Page                   |
| David Benjamin              |
| David Christensen           |
| David Fiedler               |
| David G. Johnston           |
| David Geier                 |
| David Rowley                |
| David Steele                |
| David Wheeler               |
| David Zhang                 |
| Davinder Singh              |
| Dean Rasheed                |
| Devanga Susmitha            |
| Devrim Gündüz               |
| Dian Fay                    |
| Dilip Kumar                 |
| Dimitrios Apostolou         |
| Dipesh Dhameliya            |
| Dmitrii Bondar              |
| Dmitry Dolgov               |
| Dmitry Koval                |
| Dmitry Kovalenko            |
| Dmitry Yurichev             |
| Dominique Devienne          |
| Donghang Lin                |
| Dorjpalam Batbaatar         |
| Drew Callahan               |
| Duncan Sands                |
| Dwayne Towell               |
| Dzmitry Jachnik             |
| Egor Chindyaskin            |
| Egor Rogov                  |
| Emanuel Ionescu             |
| Emanuele Musella            |
| Emre Hasegeli               |
| Eric Cyr                    |
| Erica Zhang                 |
| Erik Nordström              |
| Erik Rijkers                |
| Erik Wienhold               |
| Erki Eessaar                |
| Ethan Mertz                 |
| Etienne LAFARGE             |
| Etsuro Fujita               |
| Euler Taveira               |
| Evan Si                     |
| Evgeniy Gorbanev            |
| Fabio R. Sluzala            |
| Fabrízio de Royes Mello     |
| Feike Steenbergen           |
| Feliphe Pozzer              |
| Felix                       |
| Fire Emerald                |
| Florents Tselai             |
| Francesco Degrassi          |
| Frank Streitzig             |
| Frédéric Yhuel              |
| Fredrik Widlert             |
| Gabriele Bartolini          |
| Gavin Panella               |
| Geoff Winkless              |
| George MacKerron            |
| Gilles Darold               |
| Grant Gryczan               |
| Greg Burd                   |
| Greg Sabino Mullane         |
| Greg Stark                  |
| Grigory Kryachko            |
| Guillaume Lelarge           |
| Gunnar Morling              |
| Gunnar Wagner               |
| Gurjeet Singh               |
| Haifang Wang                |
| Hajime Matsunaga            |
| Hamid Akhtar                |
| Hannu Krosing               |
| Hari Krishna Sunder         |
| Haruka Takatsuka            |
| Hayato Kuroda               |
| Heikki Linnakangas          |
| Hironobu Suzuki             |
| Holger Jakobs               |
| Hubert Lubaczewski          |
| Hugo Dubois                 |
| Hugo Zhang                  |
| Hunaid Sohail               |
| Hywel Carver                |
| Ian Barwick                 |
| Ibrar Ahmed                 |
| Igor Gnatyuk                |
| Igor Korot                  |
| Ilia Evdokimov              |
| Ilya Gladyshev              |
| Ilyasov Ian                 |
| Imran Zaheer                |
| Isaac Morland               |
| Israel Barth Rubio          |
| Ivan Kush                   |
| Jacob Brazeal               |
| Jacob Champion              |
| Jaime Casanova              |
| Jakob Egger                 |
| Jakub Wartak                |
| James Coleman               |
| James Hunter                |
| Jan Behrens                 |
| Japin Li                    |
| Jason Smith                 |
| Jayesh Dehankar             |
| Jeevan Chalke               |
| Jeff Davis                  |
| Jehan-Guillaume de Rorthais |
| Jelte Fennema-Nio           |
| Jian He                     |
| Jianghua Yang               |
| Jiao Shuntian               |
| Jim Jones                   |
| Jim Nasby                   |
| Jingtang Zhang              |
| Jingzhou Fu                 |
| Joe Conway                  |
| Joel Jacobson               |
| John Hutchins               |
| John Naylor                 |
| Jonathan Katz               |
| Jorge Solórzano             |
| José Villanova              |
| Josef Šimánek               |
| Joseph Koshakow             |
| Julien Rouhaud              |
| Junwang Zhao                |
| Justin Pryzby               |
| Kaido Vaikla                |
| Kaimeh                      |
| Karina Litskevich           |
| Karthik S                   |
| Kartyshov Ivan              |
| Kashif Zeeshan              |
| Keisuke Kuroda              |
| Kevin Hale Boyes            |
| Kevin K Biju                |
| Kirill Reshke               |
| Kirill Zdornyy              |
| Koen De Groote              |
| Koichi Suzuki               |
| Koki Nakamura               |
| Konstantin Knizhnik         |
| Kouhei Sutou                |
| Kuntal Ghosh                |
| Kyotaro Horiguchi           |
| Lakshmi Narayana Velayudam  |
| Lars Kanis                  |
| Laurence Parry              |
| Laurenz Albe                |
| Lele Gaifax                 |
| Li Yong                     |
| Lilian Ontowhee             |
| Lingbin Meng                |
| Luboslav Špilák             |
| Luca Vallisa                |
| Lukas Fittl                 |
| Maciek Sakrejda             |
| Magnus Hagander             |
| Mahendra Singh Thalor       |
| Mahendrakar Srinivasarao    |
| Maiquel Grassi              |
| Maksim Korotkov             |
| Maksim Melnikov             |
| Man Zeng                    |
| Marat Buharov               |
| Marc Balmer                 |
| Marco Nenciarini            |
| Marcos Pegoraro             |
| Marina Polyakova            |
| Mark Callaghan              |
| Mark Dilger                 |
| Marlene Brandstaetter       |
| Marlene Reiterer            |
| Martin Rakhmanov            |
| Masahiko Sawada             |
| Masahiro Ikeda              |
| Masao Fujii                 |
| Mason Mackaman              |
| Mat Arye                    |
| Matheus Alcantara           |
| Mats Kindahl                |
| Matthew Gabeler-Lee         |
| Matthew Kim                 |
| Matthew Sterrett            |
| Matthew Woodcraft           |
| Matthias van de Meent       |
| Matthieu Denais             |
| Maurizio Boriani            |
| Max Johnson                 |
| Max Madden                  |
| Maxim Boguk                 |
| Maxim Orlov                 |
| Maximilian Chrzan           |
| Melanie Plageman            |
| Melih Mutlu                 |
| Mert Alev                   |
| Michael Banck               |
| Michael Bondarenko          |
| Michael Christofides        |
| Michael Guissine            |
| Michael Harris              |
| Michaël Paquier             |
| Michail Nikolaev            |
| Michal Kleczek              |
| Michel Pelletier            |
| Mikaël Gourlaouen           |
| Mikhail Gribkov             |
| Mikhail Kot                 |
| Milosz Chmura               |
| Muralikrishna Bandaru       |
| Murat Efendioglu            |
| Mutaamba Maasha             |
| Naeem Akhter                |
| Nat Makarevitch             |
| Nathan Bossart              |
| Navneet Kumar               |
| Nazir Bilal Yavuz           |
| Neil Conway                 |
| Niccolò Fei                 |
| Nick Davies                 |
| Nicolas Maus                |
| Niek Brasa                  |
| Nikhil Raj                  |
| Nikita                      |
| Nikita Kalinin              |
| Nikita Malakhov             |
| Nikolay Samokhvalov         |
| Nikolay Shaplov             |
| Nisha Moond                 |
| Nitin Jadhav                |
| Nitin Motiani               |
| Noah Misch                  |
| Noboru Saito                |
| Noriyoshi Shinoda           |
| Ole Peder Brandtzæg         |
| Oleg Sibiryakov             |
| Oleg Tselebrovskiy          |
| Olleg Samoylov              |
| Onder Kalaci                |
| Ondrej Navratil             |
| Patrick Stählin             |
| Paul Amonson                |
| Paul Jungwirth              |
| Paul Ramsey                 |
| Pavel Borisov               |
| Pavel Luzanov               |
| Pavel Nekrasov              |
| Pavel Stehule               |
| Peter Eisentraut            |
| Peter Geoghegan             |
| Peter Mittere               |
| Peter Smith                 |
| Phil Eaton                  |
| Philipp Salvisberg          |
| Philippe Beaudoin           |
| Pierre Giraud               |
| Pixian Shi                  |
| Polina Bungina              |
| Przemyslaw Sztoch           |
| Quynh Tran                  |
| Rafia Sabih                 |
| Raghuveer Devulapalli       |
| Rahila Syed                 |
| Rama Malladi                |
| Ran Benita                  |
| Ranier Vilela               |
| Renan Alves Fonseca         |
| Richard Guo                 |
| Richard Neill               |
| Rintaro Ikeda               |
| Robert Haas                 |
| Robert Treat                |
| Robins Tharakan             |
| Roman Zharkov               |
| Ronald Cruz                 |
| Ronan Dunklau               |
| Rui Zhao                    |
| Rushabh Lathia              |
| Rustam Allakov              |
| Ryo Kanbayashi              |
| Ryohei Takahashi            |
| RyotaK                      |
| Sagar Dilip Shedge          |
| Salvatore Dipietro          |
| Sam Gabrielsson             |
| Sam James                   |
| Sameer Kumar                |
| Sami Imseih                 |
| Samuel Thibault             |
| Satyanarayana Narlapuram    |
| Sebastian Skalacki          |
| Senglee Choi                |
| Sergei Kornilov             |
| Sergey Belyashov            |
| Sergey Dudoladov            |
| Sergey Prokhorenko          |
| Sergey Sargsyan             |
| Sergey Soloviev             |
| Sergey Tatarintsev          |
| Shaik Mohammad Mujeeb       |
| Shawn McCoy                 |
| Shenhao Wang                |
| Shihao Zhong                |
| Shinya Kato                 |
| Shlok Kyal                  |
| Shubham Khanna              |
| Shveta Malik                |
| Simon Riggs                 |
| Smolkin Grigory             |
| Sofia Kopikova              |
| Song Hongyu                 |
| Song Jinzhou                |
| Soumyadeep Chakraborty      |
| Sravan Kumar                |
| Srinath Reddy               |
| Stan Hu                     |
| Stepan Neretin              |
| Stephen Fewer               |
| Stephen Frost               |
| Steve Chavez                |
| Steven Niu                  |
| Suraj Kharage               |
| Sven Klemm                  |
| Takamichi Osumi             |
| Takeshi Ideriha             |
| Tatsuo Ishii                |
| Ted Yu                      |
| Tels                        |
| Tender Wang                 |
| Teodor Sigaev               |
| Thom Brown                  |
| Thomas Baehler              |
| Thomas Krennwallner         |
| Thomas Munro                |
| Tim Wood                    |
| Timur Magomedov             |
| Tobias Wendorff             |
| Todd Cook                   |
| Tofig Aliev                 |
| Tom Lane                    |
| Tomas Vondra                |
| Tomasz Rybak                |
| Tomasz Szypowski            |
| Torsten Foertsch            |
| Toshi Harada                |
| Tristan Partin              |
| Triveni N                   |
| Umar Hayat                  |
| Vallimaharajan G            |
| Vasya Boytsov               |
| Victor Yegorov              |
| Vignesh C                   |
| Viktor Holmberg             |
| Vinícius Abrahão            |
| Vinod Sridharan             |
| Virender Singla             |
| Vitaly Davydov              |
| Vladlen Popolitov           |
| Vladyslav Nebozhyn          |
| Walid Ibrahim               |
| Webbo Han                   |
| Wenhui Qiu                  |
| Will Mortensen              |
| Will Storey                 |
| Wolfgang Walther            |
| Xin Zhang                   |
| Xing Guo                    |
| Xuneng Zhou                 |
| Yan Chengpen                |
| Yang Lei                    |
| Yaroslav Saburov            |
| Yaroslav Syrytsia           |
| Yasir Hussain               |
| Yasuo Honda                 |
| Yogesh Sharma               |
| Yonghao Lee                 |
| Yoran Heling                |
| Yu Liang                    |
| Yugo Nagata                 |
| Yuhang Qiu                  |
| Yuki Seino                  |
| Yura Sokolov                |
| Yurii Rashkovskii           |
| Yushi Ogiwara               |
| Yusuke Sugie                |
| Yuta Katsuragi              |
| Yuto Sasaki                 |
| Yuuki Fujii                 |
| Yuya Watari                 |
| Zane Duffield               |
| Zeyuan Hu                   |
| Zhang Mingli                |
| Zhihong Yu                  |
| Zhijie Hou                  |
| Zsolt Parragi               |

***

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


---

# 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/appendixes/release/release-18.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.
