Skip to content
4 changes: 4 additions & 0 deletions docs/content/stable/additional-features/parallel-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ To enable and configure parallel queries, set the following configuration parame
| yb_parallel_range_rows | The number of rows to plan per parallel worker. To enable parallel query, set this to a value other than 0. (Recommended: 10000) | 0 |
| yb_parallel_range_size | Approximate size of parallel range for DocDB relation scans. | 1MB |

For new universes running v2025.2 or later, parallel append is enabled by default when you deploy using yugabyted, YugabyteDB Anywhere, or YugabyteDB Aeon.

In addition, when upgrading a deployment to v2025.2 or later, if the universe has the cost-based optimizer enabled (`on`), YugabyteDB will enable parallel append.

In addition, you can use the following PostgreSQL configuration parameters to configure parallel queries:

- Optimize the number of workers used by the parallel query.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/stable/architecture/design-goals.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ YugabyteDB supports single-row linearizable writes. Linearizability is one of th

YugabyteDB supports multi-row transactions with three isolation levels: Serializable, Snapshot (also known as repeatable read), and Read Committed isolation.

- The [YSQL API](../../api/ysql/) supports Serializable, Snapshot (default), and Read Committed isolation using the PostgreSQL isolation level syntax of `SERIALIZABLE`, `REPEATABLE READ`, and `READ COMMITTED` respectively. For more details, see [Isolation levels](#transaction-isolation-levels).
- The [YSQL API](../../api/ysql/) supports Serializable, Snapshot, and Read Committed isolation using the PostgreSQL isolation level syntax of `SERIALIZABLE`, `REPEATABLE READ`, and `READ COMMITTED` respectively. For more details, see [Isolation levels](#transaction-isolation-levels).
- The [YCQL API](../../api/ycql/) supports only Snapshot isolation (default) using the [BEGIN TRANSACTION](../../api/ycql/dml_transaction/) syntax.

## Partition Tolerance - CAP
Expand Down
4 changes: 2 additions & 2 deletions docs/content/stable/architecture/transactions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ To learn how YugabyteDB decides which transactions should be aborted in case of

## Read committed

Read Committed is the isolation level in which, clients do not need to retry or handle serialization errors (40001) in application logic.
Read Committed is the isolation level in which clients do not need to retry or handle serialization errors (40001) in application logic.

{{<lead link="read-committed/">}}
To understand how Read committed is implement and how to use it, see [Read committed](read-committed/).
To understand how Read committed is implemented and how to use it, see [Read committed](read-committed/).
{{</lead>}}

## Read restart error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ Transaction isolation level support differs between the YSQL and YCQL APIs:

Similarly to PostgreSQL, you can specify Read Uncommitted for YSQL, but it behaves the same as Read Committed.

Read Committed is supported only if the YB-TServer flag `yb_enable_read_committed_isolation` is set to `true`. By default, this flag is `false`, in which case the Read Committed isolation level of YugabyteDB's transactional layer falls back to the stricter Snapshot isolation. The default isolation level for the YSQL API is essentially Snapshot because Read Committed, which is the YSQL API and PostgreSQL syntactic default, maps to Snapshot isolation.
Read Committed is supported only if the YB-TServer flag `yb_enable_read_committed_isolation` is set to `true`.

For new universes running v2025.2 or later, Read Committed is enabled by default when you deploy using yugabyted, YugabyteDB Anywhere, or YugabyteDB Aeon.

In versions of YugabyteDB prior to v2025.2, or for manually deployed universes, `yb_enable_read_committed_isolation` is `false` (the default), and the Read Committed isolation level of YugabyteDB's transactional layer falls back to the stricter Snapshot isolation. This makes the default isolation level for the YSQL API effectively Snapshot because Read Committed, which is the YSQL API and PostgreSQL syntactic default, maps to Snapshot isolation.

## Internal locking in DocDB

Expand Down
10 changes: 7 additions & 3 deletions docs/content/stable/architecture/transactions/read-committed.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ Note that retries for the statement in YugabyteDB's Read Committed isolation are

{{< tip title="Enable Read Committed" >}}

To enable Read Committed isolation, set the YB-TServer flag [yb_enable_read_committed_isolation](../../../reference/configuration/yb-tserver/#yb-enable-read-committed-isolation) to `true`. By default this flag is `false` and in this case the Read Committed isolation level of the YugabyteDB transactional layer falls back to the stricter Snapshot isolation (in which case `READ COMMITTED` and `READ UNCOMMITTED` of YSQL also in turn use Snapshot isolation).
Read Committed is supported only if the YB-TServer flag `yb_enable_read_committed_isolation` is set to `true`.

For new universes running v2025.2 or later, Read Committed is enabled by default when you deploy using yugabyted, YugabyteDB Anywhere, or YugabyteDB Aeon.

In versions of YugabyteDB prior to v2025.2, or for manually deployed universes, `yb_enable_read_committed_isolation` is `false` (the default), and the Read Committed isolation level of YugabyteDB's transactional layer falls back to the stricter Snapshot isolation. This makes the default isolation level for the YSQL API effectively Snapshot because Read Committed, which is the YSQL API and PostgreSQL syntactic default, maps to Snapshot isolation.

Refer to [Usage](#usage) to start a Read Committed transaction after enabling the flag.
{{< /tip >}}
Expand Down Expand Up @@ -342,7 +346,7 @@ The retries for serialization errors are done at the statement level. Each retry

## Usage

To use Read Committed isolation, first set the YB-TServer flag `yb_enable_read_committed_isolation=true`; this maps the syntactic Read Committed isolation in YSQL to the Read Committed implementation in DocDB. (When set to `false`, syntactic Read Committed in YSQL is mapped to Snapshot isolation in DocDB, meaning it behaves as Repeatable Read.)
To use Read Committed isolation, ensure the YB-TServer flag `yb_enable_read_committed_isolation=true`; this maps the syntactic Read Committed isolation in YSQL to the Read Committed implementation in DocDB. (When set to `false`, syntactic Read Committed in YSQL is mapped to Snapshot isolation in DocDB, meaning it behaves as Repeatable Read.)

Assuming the flag has been set, you can start a Read Committed transaction in the following ways:

Expand Down Expand Up @@ -1409,7 +1413,7 @@ Read Committed interacts with the following feature:

## Limitations

* A `SET TRANSACTION ISOLATION LEVEL ...` statement immediately issued after `BEGIN;` or `BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;` will fail if the YB-TServer GFlag `yb_enable_read_committed_isolation=true`, and the following error will be issued:
* A `SET TRANSACTION ISOLATION LEVEL ...` statement immediately issued after `BEGIN;` or `BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;` will fail if the YB-TServer flag `yb_enable_read_committed_isolation=true`, and the following error will be issued:

```output
ERROR: SET TRANSACTION ISOLATION LEVEL must not be called in a subtransaction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ You configure CBO using the [yb_enable_cbo](../../reference/configuration/yb-tse

## New deployments

For new YSQL deployments, or when migrating from another system, to enable CBO, add the parameter to [ysql_pg_conf_csv](../../reference/configuration/yb-tserver/#ysql-pg-conf-csv) as follows:
For new universes running v2025.2 or later, CBO is enabled by default when you deploy using yugabyted, YugabyteDB Anywhere, or YugabyteDB Aeon.

For older YSQL deployments, or when deploying manually, to enable CBO, add the parameter to [ysql_pg_conf_csv](../../reference/configuration/yb-tserver/#ysql-pg-conf-csv) as follows:

```sh
--ysql_pg_conf_csv=yb_enable_cbo=on
Expand All @@ -53,6 +55,12 @@ When upgrading a deployment to a version of YugabyteDB that supports the `yb_ena

You should migrate existing deployments from using `legacy_mode` or `legacy_stats_mode` to either `on` (recommended) or, if you do not want to use CBO, `off`.

Note that when upgrading a deployment to v2025.2 or later, if the universe has the cost-based optimizer enabled (`on`), YugabyteDB will enable the following features:

- [Auto Analyze](../../additional-features/auto-analyze/): ysql_enable_auto_analyze is set to true.
- [YugabyteDB bitmap scan](../../reference/configuration/postgresql-compatibility/#yugabytedb-bitmap-scan): yb_enable_bitmapscan is set to true.
- [Parallel append](../../additional-features/parallel-query/): yb_enable_parallel_append is set to true.

<!--## Recommended settings

| Scenario | Tables analyzed | Setting |
Expand Down
2 changes: 2 additions & 0 deletions docs/content/stable/deploy/manual-deployment/start-masters.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ The number of comma-separated addresses in `--master_addresses` should equal the

You can specify multiple directories using the [`--fs_data_dirs`](../../../reference/configuration/yb-master/#fs-data-dirs) flag. Replace the [`--rpc_bind_addresses`](../../../reference/configuration/yb-master/#rpc-bind-addresses) value with the private IP address of the host, and set the `placement_cloud`, `placement_region`, and `placement_zone` values appropriately. For single zone deployment, use the same value for the `placement_zone` flag.

If you are running YSQL, for enhanced PostgreSQL compatibility, you can enable [Enhanced PostgreSQL Compatibility Mode](../../../reference/configuration/postgresql-compatibility/) (recommended).

{{<tags/feature/tp idea="1807">}} Highly accurate clocks can be configured by specifying `--time_source=clockbound`. Requires [system configuration](../system-config#set-up-time-synchronization).

For the full list of configuration flags, see the [YB-Master reference](../../../reference/configuration/yb-master/).
Expand Down
10 changes: 10 additions & 0 deletions docs/content/stable/deploy/manual-deployment/start-yugabyted.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ cd yugabyte-{{< yb-version version="stable" >}}
mkdir ybc | tar -xvf share/ybc-2.0.0.0-b19-linux-x86_64.tar.gz -C ybc --strip-components=1
```

## PostgreSQL compatibility

For _new universes_ running v2025.2 or later, the following features are enabled by default when you deploy using yugabyted, YugabyteDB Anywhere, or YugabyteDB Aeon:

- [Read committed](../../../architecture/transactions/read-committed/) (yb_enable_read_committed_isolation=true)
- [Cost based optimizer](../../../best-practices-operations/ysql-yb-enable-cbo/) (yb_enable_cbo=on)
- [Auto Analyze](../../../additional-features/auto-analyze/) (ysql_enable_auto_analyze=true)
- [YugabyteDB bitmap scan](../../../reference/configuration/postgresql-compatibility/#yugabytedb-bitmap-scan) (yb_enable_bitmapscan=true)
- [Parallel query](../../../additional-features/parallel-query/) (yb_enable_parallel_append=true)

## Deploy a multi-zone cluster

Note that single zone configuration is a special case of multi-zone where all placement-related flags are set to the same value across every node.
Expand Down
72 changes: 11 additions & 61 deletions docs/content/stable/explore/transactions/isolation-levels.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ YugabyteDB supports three isolation levels in the transactional layer:

The default isolation level for the YSQL API is effectively Snapshot (that is, the same as PostgreSQL's `REPEATABLE READ`) because, by default, Read committed, which is the YSQL API and PostgreSQL _syntactic_ default, maps to Snapshot isolation.

To enable Read committed, you must set the YB-TServer flag `yb_enable_read_committed_isolation` to `true`. By default this flag is `false` and the Read committed isolation level of the YugabyteDB transactional layer falls back to the stricter Snapshot isolation (in which case `READ COMMITTED` and `READ UNCOMMITTED` of YSQL also in turn use Snapshot isolation).
However, for new universes running v2025.2 or later, Read Committed is enabled by default when you deploy using yugabyted, YugabyteDB Anywhere, or YugabyteDB Aeon.

In versions of YugabyteDB prior to v2025.2, or for manually deployed universes, to enable Read committed, you must set the YB-TServer flag `yb_enable_read_committed_isolation` to `true`. By default this flag is `false` , and the Read Committed isolation level of YugabyteDB's transactional layer falls back to the stricter Snapshot isolation. This makes the default isolation level for the YSQL API effectively Snapshot because Read Committed, which is the YSQL API and PostgreSQL syntactic default, maps to Snapshot isolation.

{{< tip title="Tip" >}}

To avoid serializable errors, that is, to run applications with no retry logic, keep the default `READ COMMITTED` isolation (`--ysql_default_transaction_isolation`), and set the YB-TServer `--yb_enable_read_committed_isolation` flag to true. This enables read committed isolation.
To avoid serializable errors (that is, to run applications with no retry logic), keep the default `READ COMMITTED` isolation (`--ysql_default_transaction_isolation`), and set the YB-TServer `--yb_enable_read_committed_isolation` flag to true. This enables read committed isolation.

{{< /tip >}}

Expand Down Expand Up @@ -229,7 +231,7 @@ Snapshot isolation detects only write-write conflicts; it does not detect read-w

Applications using this level must be prepared to retry transactions due to serialization failures.

Consider an example of transactions' behavior under the Snapshot isolation level (mapped to PostgreSQL's Repeatable Read level).
Consider an example of transactions' behavior under the Snapshot isolation level.

Create a table with sample data, as follows:

Expand All @@ -249,10 +251,10 @@ Next, connect to the universe using two independent ysqlsh instances, referred t
<tr>
<td>

Begin a transaction in session #1. This is Snapshot isolation by default, meaning it will work against a snapshot of the database as of this point:
Begin a transaction in session #1 with the Snapshot isolation level, meaning it will work against a snapshot of the database as of this point:

```sql
BEGIN TRANSACTION;
BEGIN TRANSACTION ISOLATION LEVEL SNAPSHOT;
```

</td>
Expand Down Expand Up @@ -290,6 +292,7 @@ SELECT * FROM example;
Insert a different row. Verify that the row inserted in the transaction in session #1 is not visible in this session, as follows:

```sql
BEGIN TRANSACTION ISOLATION LEVEL SNAPSHOT;
INSERT INTO example VALUES (2);
SELECT * FROM example;
```
Expand Down Expand Up @@ -374,10 +377,10 @@ Connect to the universe using two independent ysqlsh instances, referred to as s
<tr>
<td>

By default, the YB-TServer flag `yb_enable_read_committed_isolation` is false. In this case, Read committed maps to Snapshot isolation at the transactional layer. So, `READ COMMITTED` of YSQL API in turn maps to Snapshot Isolation:
Begin a transaction in session #1. (Note that because the universe was deployed using yugabyted, YugabyteDB Anywhere, or YugabyteDB Aeon, Read Committed is the default isolation level.)

```sql
BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
BEGIN TRANSACTION;
SELECT * FROM test;
```

Expand Down Expand Up @@ -417,22 +420,6 @@ SELECT * FROM test;
COMMIT;
```

```output
k | v
---+---
1 | 2
(1 row)
```

The inserted row (2, 3) is not visible because Read committed is disabled at the transactional layer and maps to Snapshot in which the whole transaction sees a consistent snapshot of the database.

Set the YB-TServer flag `yb_enable_read_committed_isolation` to `true`:

```sql
BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
SELECT * FROM test;
```

```output
k | v
---+---
Expand All @@ -441,44 +428,7 @@ SELECT * FROM test;
(2 rows)
```

</td>
<td>
</td>
</tr>

<tr>
<td>
</td>
<td>

Insert a new row, as follows:

```sql
INSERT INTO test VALUES (3, 4);
```

</td>
</tr>

<tr>
<td>

Perform the read again in the same transaction, as follows:

```sql
SELECT * FROM test;
```

```output
k | v
---+---
1 | 2
2 | 3
3 | 4
(3 rows)
```

This time, the statement can see the row (3, 4) that was committed after this transaction had been started but before the statement has been issued.
Unlike snapshot isolation, the statement can see the row (2, 3) that was committed after this transaction had been started but before the statement has been issued.

</td>
<td>
Expand Down
1 change: 1 addition & 0 deletions docs/content/stable/faq/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ headerTitle: FAQ
linkTitle: FAQ
description: YugabyteDB FAQ — How does YugabyteDB work? When is YugabyteDB database a good fit? What APIs does YugabyteDB support? And other frequently asked questions.
aliases:
- /stable/faq/
- /stable/faq/product/
- /stable/introduction/overview/
- /stable/introduction/benefits/
Expand Down
14 changes: 13 additions & 1 deletion docs/content/stable/manage/upgrade-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,19 @@ To upgrade YugabyteDB to a version based on a different version of PostgreSQL (f
- If you have PITR enabled, you must disable it before performing an upgrade. Re-enable it only after the upgrade is either finalized or rolled back.
- After the upgrade, PITR cannot be done to a time before the upgrade.

- For more information, refer to [Upgrade FAQ](/stable/faq/operations-faq/#upgrade).
- YSQL

- For additional information on upgrading universes that have Enhanced PostgreSQL Compatibility Mode, refer to [Enhanced PostgreSQL Compatibility Mode](../../reference/configuration/postgresql-compatibility/).

- For information on upgrading or enabling cost-based optimizer, refer to [Enable cost-based optimizer](../../best-practices-operations/ysql-yb-enable-cbo/).

If you upgrade to v2025.2 and the universe already has cost-based optimizer enabled, the following features are enabled by default:

- Auto Analyze (ysql_enable_auto_analyze=true)
- YugabyteDB bitmap scan (yb_enable_bitmapscan=true)
- Parallel query (yb_enable_parallel_append=true)

For more information, refer to [Upgrade FAQ](/stable/faq/operations-faq/#upgrade).

## Upgrade YugabyteDB cluster

Expand Down
Loading