-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[DOC-1080][2025.2] Updated defaults for EPCM flags #29478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
73a4669
83dc70a
2ddd68d
6bc0c37
ba88111
7ba877a
98c2168
87ea435
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we also mention here that upgrading to a version >= 2025.2 will not change the default?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nvm, the "For new universes" part clarifies it |
||
|
|
||
| ## Internal locking in DocDB | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we also mention here that upgrading to a version >= 2025.2 will not change the default?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nvm, the "For new universes" part clarifies it |
||
|
|
||
| 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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we also mention that upgrading to >= 2025.2 will not enable cbo automatically if it was off?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nvm, the "For new universes" part clarifies it |
||
| 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/). | ||
|
|
||
| <!--## Recommended settings | ||
|
|
||
| | Scenario | Tables analyzed | Setting | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also mention that upgrading to a version >= 2025.2 will not automatically enable parallel append if it was off earlier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, the "For new universes" part clarifies it