Skip to content

Commit 1456d89

Browse files
Merge pull request #36546 from dimitri-furman/dfurman/adr
Clarify PVS cleanup details
2 parents 4289815 + 3f766cc commit 1456d89

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

docs/relational-databases/system-dynamic-management-views/sys-dm-tran-persistent-version-store-stats.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: sys.dm_tran_persistent_version_store_stats returns information for
44
author: rwestMSFT
55
ms.author: randolphwest
66
ms.reviewer: wiassaf, dfurman
7-
ms.date: 02/05/2025
7+
ms.date: 02/02/2026
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -42,10 +42,10 @@ Returns information for accelerated database recovery (ADR) persistent version s
4242
| `min_transaction_timestamp` | **bigint** | The minimum useful timestamp in the system from snapshot scans. |
4343
| `online_index_min_transaction_timestamp` | **bigint** | The minimum useful timestamp in the system to hold up the PVS cleanup during online index builds. |
4444
| `secondary_low_water_mark` | **bigint** | The low water mark aggregated for queries on readable secondaries. The value is a transaction ID and can be matched with `oldest_active_transaction_id` and `oldest_aborted_transaction_id`. |
45-
| `offrow_version_cleaner_start_time` | **datetime2(7)** | The last start time of the off-row PVS cleanup process. |
46-
| `offrow_version_cleaner_end_time` | **datetime2(7)** | The last end time of the off-row PVS cleanup process. If start time has value but the end time doesn't, it means PVS cleanup is ongoing on this database. |
47-
| `aborted_version_cleaner_start_time` | **datetime2(7)** | The start timestamp of the last aborted transaction sweep. |
48-
| `aborted_version_cleaner_end_time` | **datetime2(7)** | The end timestamp of last aborted transaction sweep. If start time has value but the end time doesn't, it means PVS cleanup is ongoing on this database. |
45+
| `offrow_version_cleaner_start_time` | **datetime2(7)** | The start time of the last sweep that cleaned up off-row versions. |
46+
| `offrow_version_cleaner_end_time` | **datetime2(7)** | The end time of the last sweep that cleaned up off-row versions. If start time has value but the end time doesn't, it means PVS cleanup is ongoing on this database. |
47+
| `aborted_version_cleaner_start_time` | **datetime2(7)** | The start timestamp of the last sweep that cleaned up aborted transactions. |
48+
| `aborted_version_cleaner_end_time` | **datetime2(7)** | The end timestamp of last sweep that cleaned up aborted transactions. If start time has value but the end time doesn't, it means PVS cleanup is ongoing on this database. |
4949
| `pvs_off_row_page_skipped_low_water_mark` | **bigint** | The number of pages skipped during cleanup due to hold up from secondary read queries. |
5050
| `pvs_off_row_page_skipped_transaction_not_cleaned` | **bigint** | The number of pages skipped during cleanup due to aborted transactions. Note this value doesn't reflect the PVS hold up from aborted transactions since the version cleaner uses a min threshold for aborted transaction version cleanup. Can be ignored when troubleshooting large PVS issues. |
5151
| `pvs_off_row_page_skipped_oldest_active_xdesid` | **bigint** | The number of pages skipped during cleanup due to the oldest active transaction. |

docs/relational-databases/system-stored-procedures/sys-sp-persistent-version-cleanup-transact-sql.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Manually starts persistent version store (PVS) cleanup process, a
44
author: rwestMSFT
55
ms.author: randolphwest
66
ms.reviewer: dfurman
7-
ms.date: 10/19/2025
7+
ms.date: 02/02/2026
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -23,7 +23,7 @@ monikerRange: ">=sql-server-ver15 || >=sql-server-linux-ver15 || =azuresqldb-mi-
2323

2424
[!INCLUDE [SQL Server 2019, ASDB, ASDBMI-fabricsqldb](../../includes/applies-to-version/sqlserver2019-asdb-asdbmi-fabricsqldb.md)]
2525

26-
Manually starts persistent version store (PVS) cleanup process, a key element of accelerated database recovery (ADR). This cleaner also removes uncommitted data in PVS from aborted transactions.
26+
Manually starts persistent version store (PVS) cleanup process, a key element of accelerated database recovery (ADR). The cleaner removes obsolete row versions from the in-row and off-row [PVS storage](../sql-server-transaction-locking-and-row-versioning-guide.md#space-used-by-the-persistent-version-store-pvs), and also removes uncommitted changes in PVS from aborted transactions.
2727

2828
It isn't typically necessary to start the PVS cleanup process manually using `sys.sp_persistent_version_cleanup`. However in some scenarios, you might want to initiate the PVS cleanup process manually during a known period of rest/recovery after busy OLTP activity.
2929

@@ -53,15 +53,15 @@ Optional. *@scanallpages* is **bit**, with a default of `0`. When set to `1`, th
5353

5454
#### [ @clean_option = ] *clean_option*
5555

56-
Optional. Possible options determine whether or not to reclaim off-row PVS page. *@clean_option* is **int**, with a default of `0`. This reference isn't commonly needed and the default value `0` is recommended.
56+
Optional. The option to determine the type of cleanup to perform. *@clean_option* is **int**, with a default of `0`. This parameter isn't commonly needed and the default value `0` is recommended.
5757

5858
| Value | Description |
59-
| :--- | :--- |
60-
| `0` | Default, no option specified |
61-
| `1` | off-row version store without checking individual PVS page contents |
62-
| `2` | off-row version store with each PVS page visited |
63-
| `3` | in-row version store only |
64-
| `4` | internal use only |
59+
| --- | --- |
60+
| `0` | Default, perform all cleanup. |
61+
| `1` | Clean up the off-row [version storage](../sql-server-transaction-locking-and-row-versioning-guide.md#space-used-by-the-persistent-version-store-pvs) without examining PVS page contents. Faster, but might skip deallocation of unused pages in PVS. This is the default behavior when `@clean_option` is omitted or set to `0`. |
62+
| `2` | Clean up the off-row [version storage](../sql-server-transaction-locking-and-row-versioning-guide.md#space-used-by-the-persistent-version-store-pvs) by checking each PVS page contents. Slower, but always deallocates all unused pages. |
63+
| `3` | Clean up the in-row [version storage](../sql-server-transaction-locking-and-row-versioning-guide.md#space-used-by-the-persistent-version-store-pvs) only. |
64+
| `4` | Clean up row versions generated by aborted transactions only (also known as logical revert). |
6565

6666
## Return code values
6767

0 commit comments

Comments
 (0)