-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt: remove uniqueness checks for gen_random_uuid()
This commit removes uniqueness checks for UUID columns that are set to gen_random_uuid(), because uniqueness can be sufficiently guaranteed by randomness. The probability of collision when using gen_random_uuid() is extremely low. If users still want the checks, however, they can set sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled, a new cluster setting, to true. By default the setting is false. Fixes #57790 Release justification: This commit is a low-risk update to new functionality. Release note (sql change): Added a new cluster setting sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled, which controls creation of uniqueness checks for UUID columns set to gen_random_uuid(). When enabled, uniqueness checks will be added for the UUID column if it has a unique constraint that cannot be enforced by an index. When disabled, no uniqueness checks are planned for these columns, and uniqueness is assumed due to the near-zero collision probability of gen_random_uuid()
- Loading branch information
Showing
6 changed files
with
470 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.