# New Features Summary

> The source document's overview of the release, benefits, and incompatibilities.

---

LLMS index: [llms.txt](/en/llms.txt)

---

<div class="feature-source-note"><span class="feature-edition-badge">GA</span><span><strong>Source pages:</strong> PDF 8-14</span><span><a href="https://github.com/nori-shinoda/documents/blob/1773200c5362476c4a549222b7d17fa91f546cae/postgresql17_ga_new_features_en_20240930-1.pdf">Original PDF on GitHub</a></span></div>

<p class="feature-page-marker" id="pgfeat-17-summary-pdf-page-8">PDF page 8</p>

More than 200 new features have been added to PostgreSQL 17. This chapter provides an overview of typical new features and benefits. Details of the new features will be explained in "3. New Feature Detail".

### 2.1 Improvements to adapt to large scale environments {#pg17-2-1-improvements-to-adapt-to-large-scale-environments}

The following features have been added that can be applied to large scale environments:

#### Incremental Backup {#pg17-p8-incremental-backup}

Incremental backups are now supported as a standard feature of PostgreSQL. pg_basebackup command now has an option to take incremental backups. To perform an incremental backup, the manifest of the base-backup is used to determine the incremental backup. New command pg_combinebackup merges the base and incremental backups.

#### Supports large-scale memory {#pg17-p8-supports-large-scale-memory}

The SLRU cache is divided into multiple banks, which is expected to reduce the lock range and improve cache search speed. Additionally, several parameters have been added to determine the size of each SLRU memory region.

### 2.2 Improved reliability {#pg17-2-2-improved-reliability}

PostgreSQL 17 implements the following enhancements to improve reliability.

#### Logical Replication Slot Synchronization {#pg17-p8-logical-replication-slot-synchronization}

The replication slot information used for logical replication can now be synchronized to the standby server for streaming replication.

#### Wait for Streaming Replication {#pg17-p8-wait-for-streaming-replication}

The feature has been added to wait for logical replication updates until change data has been sent to the standby server for streaming replication.

<p class="feature-page-marker" id="pgfeat-17-summary-pdf-page-9">PDF page 9</p>

### 2.3 Improved maintainability {#pg17-2-3-improved-maintainability}

The following features that can improve operability have been added.

#### Checkpointer Statistics {#pg17-p9-checkpointer-statistics}

The pg_stat_checkpointer view has been added to retrieve checkpointer process statistics. some columns in the pg_stat_checkpointer view have been moved from the pg_stat_bgwriter view.

#### Enhancement of the parameter files {#pg17-p9-enhancement-of-the-parameter-files}

The maximum length of token names that can be used in the pg_hba.conf and pg_ident.conf files has been changed from 256 bytes to unlimited.

#### MAINTAIN privilege {#pg17-p9-maintain-privilege}

The MAINTAIN privilege has been added to perform maintenance operations such as VACUUM, ANALYZE, and REINDEX statements. The pg_maintain predefined role has been added to allow maintenance operations on objects for all users.

#### Login event trigger {#pg17-p9-login-event-trigger}

The login event trigger is now available that executes upon successful authentication.

### 2.4 Improvements in Programming {#pg17-2-4-improvements-in-programming}

The following functions have been added to SQL statements.

#### JSON-related {#pg17-p9-json-related}

Multiple JSON constructors and many JSONPATH methods have been added. Also added JSON_EXISTS, JSON_QUERY, JSON_VALUE, and JSON_TABLE functions.

#### COPY statement {#pg17-p9-copy-statement}

An option has been added to continue processing in the occurrence of data type conversion errors.

#### MERGE statement {#pg17-p9-merge-statement}

The MERGE statement now supports updatable views. Also, the RETURNING clause and BY SOURCE clause can now be specified.

<p class="feature-page-marker" id="pgfeat-17-summary-pdf-page-10">PDF page 10</p>

#### PL/pgSQL {#pg17-p10-pl-pgsql}

Variable declarations can now specify arrays for the %TYPE and %ROWTYPE attributes, which indicate the data type of table columns and tuples as a whole.

### 2.5 Preparing for future new features {#pg17-2-5-preparing-for-future-new-features}

PostgreSQL 17 is now ready for features that will be provided in future versions.

#### Wait Event view {#pg17-p10-wait-event-view}

The pg_wait_events view has been added to retrieve the names of wait events. Currently, only the name and description of the wait event is available. In the future, it is expected to acquire the cumulative time of wait events, etc.

#### Providing new I/O methods {#pg17-p10-providing-new-i-o-methods}

The foundation for using asynchronous I/O and multiple block I/O is now provided.

### 2.6 Incompatibility {#pg17-2-6-incompatibility}

In PostgreSQL 17, the following specifications have been changed from PostgreSQL 16.

#### 2.6.1 End of support {#pg17-2-6-1-end-of-support}

PostgreSQL 17 changed the supported versions for the following platforms and tools. [[1301c80](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=1301c80b2167feb658a738fa4ceb1c23d0991e23), [8e278b6](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=8e278b65766446f29085fe686723961c4b216e6f), [820b5af](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=820b5af73dcc6a5d0db6a98a62a6b859e5d107b6), [0b16bb8](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=0b16bb8776bb834eb1ef8204ca95dd7667ab948b), [cc09e65](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=cc09e6549f2bd2142b154d7d9802fb7a0abc643e)] The platforms and tools that are no longer supported are listed below.

- Microsoft Visual Studio

- LLVM 9 or earlier

- IBM AIX

- adminpack contrib module Changes in supported versions of components required to build PostgreSQL 17 are as follows.

- OpenSSL 1.0.2 or later

- LLVM 10 or later

<p class="feature-page-marker" id="pgfeat-17-summary-pdf-page-11">PDF page 11</p>

#### 2.6.2 Configure command {#pg17-2-6-2-configure-command}

The following configure command options have been removed. [[68a4b58](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=68a4b58eca032916e2aad78d63f717dcb147e906), [1c1eec0](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=1c1eec0f2d88b7e823af959103b2100da493caa9)]

**Table 4.** Removed options

| Option | Description | Note |
| --- | --- | --- |
| --disable-thread-safety | Disable thread safety for client libraries |  |
| --with-CC | Compiler specification (deprecated since July 2000) |  |

#### 2.6.3 MERGE statement {#pg17-2-6-3-merge-statement}

The SELECT privilege on the target table is now required even when specifying the DO NOTHING clause in a MERGE statement. This specification will be backported to PostgreSQL 15 and later. [[4989ce7](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4989ce72644b9d636b9b23c7a1719a405e62670b)]

**Example 1.** Behavior of PostgreSQL 16\.2

```text
postgres=# CREATE TABLE merge1(c1 INT, c2 VARCHAR(10)) ;
CREATE TABLE
postgres=# \connect postgres demo
You are now connected to database "postgres" as user "demo".
postgres=> MERGE INTO merge1 USING (SELECT 1) ON true
WHEN MATCHED THEN DO NOTHING ;
MERGE 0
```

**Example 2.** Behavior of PostgreSQL 17

```text
postgres=# CREATE TABLE merge1(c1 INT, c2 VARCHAR(10)) ;
CREATE TABLE
postgres=# \connect postgres demo
You are now connected to database "postgres" as user "demo".
postgres=> MERGE INTO merge1 USING (SELECT 1) ON true
WHEN MATCHED THEN DO NOTHING ;
ERROR:  permission denied for table merge1
```

<p class="feature-page-marker" id="pgfeat-17-summary-pdf-page-12">PDF page 12</p>

#### 2.6.4 Explain statement {#pg17-2-6-4-explain-statement}

The output format of subqueries with the EXPLAIN statement has been changed. [[fd0398f](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=fd0398fcb099980fbedbb7750356ef234408c1c9)]

**Example 3.** PostgreSQL 16 output

```text
postgres=> EXPLAIN (COSTS OFF) SELECT * FROM data1 WHERE
c1=(SELECT MAX(c1) FROM data1) ;
                                    QUERY PLAN
---------------------------------------------------------------------------
Index Scan using data1_pkey on data1
   Index Cond: (c1 = $1)
   InitPlan 2 (returns $1)
     ->  Result
           InitPlan 1 (returns $0)
             ->  Limit
                   ->  Index Only Scan Backward using data1_pkey on data1
data1_1
                         Index Cond: (c1 IS NOT NULL)
(8 rows)
```

**Example 4.** PostgreSQL 17 output

```text
postgres=> EXPLAIN (COSTS OFF) SELECT * FROM data1 WHERE
c1=(SELECT MAX(c1) FROM data1) ;
                                    QUERY PLAN
---------------------------------------------------------------------------
Index Scan using data1_pkey on data1
   Index Cond: (c1 = (InitPlan 2).col1)
   InitPlan 2
     ->  Result
           InitPlan 1
             ->  Limit
                   ->  Index Only Scan Backward using data1_pkey on data1
data1_1
(7 rows)
```

<p class="feature-page-marker" id="pgfeat-17-summary-pdf-page-13">PDF page 13</p>

#### 2.6.5 Pgrowlocks function {#pg17-2-6-5-pgrowlocks-function}

The output of the modes column of the results of executing the pgrowlocks function in the pgrowlocks extension has been changed. This change will be backported to the previous version. [[15d5d74](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=15d5d7405d3591aeba418b20c5ac75e80ddc8c74)]

**Table 5.** Modes column output

| version | version | Note |
| --- | --- | --- |
| Share | For Share |  |
| Key Share | For Key Share |  |

**Example 5.** Execution result of pgrowlocks function

```text
postgres=> SELECT * FROM pgrowlocks('data1') ;
 locked_row | locker | multi | xids  |       modes       |  pids
------------+--------+-------+-------+-------------------+--------
 (0,1)      |    747 | f     | {747} | {"For Share"}     | {9555}
 (0,2)      |    747 | f     | {747} | {"For Key Share"} | {9555}
(2 rows)
```

#### 2.6.6 Other functions {#pg17-2-6-6-other-functions}

There is an incompatibility with the pg_walfile_name / pg_walfile_name_offset functions. In previous versions, these functions returned the previous segment number when the LSN was on a segment boundary. It has been changed to always return the current segment number of the LSN. This fix is also reflected in previous versions. [[344afc7](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=344afc77690b4cef2605420d67c1d1ceb28760cc)]

<p class="feature-page-marker" id="pgfeat-17-summary-pdf-page-14">PDF page 14</p>
