diff --git a/docs/content/stable/additional-features/parallel-query.md b/docs/content/stable/additional-features/parallel-query.md index a84630c01f79..b66c4d0f84ea 100644 --- a/docs/content/stable/additional-features/parallel-query.md +++ b/docs/content/stable/additional-features/parallel-query.md @@ -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. diff --git a/docs/content/stable/architecture/design-goals.md b/docs/content/stable/architecture/design-goals.md index f443a33a2d9b..3b8a7145dc5c 100644 --- a/docs/content/stable/architecture/design-goals.md +++ b/docs/content/stable/architecture/design-goals.md @@ -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 diff --git a/docs/content/stable/architecture/transactions/_index.md b/docs/content/stable/architecture/transactions/_index.md index 05512c8362bc..bb948a8c4123 100644 --- a/docs/content/stable/architecture/transactions/_index.md +++ b/docs/content/stable/architecture/transactions/_index.md @@ -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. {{}} -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/). {{}} ## Read restart error diff --git a/docs/content/stable/architecture/transactions/isolation-levels.md b/docs/content/stable/architecture/transactions/isolation-levels.md index 29cd983eae50..1ffe7c6669bc 100644 --- a/docs/content/stable/architecture/transactions/isolation-levels.md +++ b/docs/content/stable/architecture/transactions/isolation-levels.md @@ -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 diff --git a/docs/content/stable/architecture/transactions/read-committed.md b/docs/content/stable/architecture/transactions/read-committed.md index 8d21cdc9b96e..300c7259c329 100644 --- a/docs/content/stable/architecture/transactions/read-committed.md +++ b/docs/content/stable/architecture/transactions/read-committed.md @@ -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 >}} @@ -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: @@ -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 diff --git a/docs/content/stable/best-practices-operations/ysql-yb-enable-cbo.md b/docs/content/stable/best-practices-operations/ysql-yb-enable-cbo.md index f15b271c927f..6fb02364bf33 100644 --- a/docs/content/stable/best-practices-operations/ysql-yb-enable-cbo.md +++ b/docs/content/stable/best-practices-operations/ysql-yb-enable-cbo.md @@ -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 @@ -53,6 +55,14 @@ 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: ysql_enable_auto_analyze is set to true. +- Bitmap scans: yb_enable_bitmapscan is set to true. +- Parallel append: yb_enable_parallel_append is set to true. + +For more information on these features, see [Enhanced PostgreSQL Compatibility](../../reference/configuration/postgresql-compatibility/). +