-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql/opt: add implicit SELECT FOR UPDATE support for DELETE statements #50181
Copy link
Copy link
Closed
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)E-quick-winLikely to be a quick win for someone experienced.Likely to be a quick win for someone experienced.T-sql-queriesSQL Queries TeamSQL Queries Team
Description
Address this TODO:
cockroach/pkg/sql/opt/exec/execbuilder/mutation.go
Lines 991 to 999 in 01a780b
| // tryApplyImplicitLockingToDeleteInput determines whether or not the builder | |
| // should apply a FOR UPDATE row-level locking mode to the initial row scan of | |
| // an DELETE statement. | |
| // | |
| // TODO(nvanbenschoten): implement this method to match on appropriate Delete | |
| // expression trees and apply a row-level locking mode. | |
| func (b *Builder) shouldApplyImplicitLockingToDeleteInput(del *memo.DeleteExpr) bool { | |
| return false | |
| } |
Similar to #50180, but likely lower priority because sustained contending DELETEs don't seem to be as common, probably because once a row is deleted, it stays deleted and can't be deleted again.
Jira issue: CRDB-4147
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)E-quick-winLikely to be a quick win for someone experienced.Likely to be a quick win for someone experienced.T-sql-queriesSQL Queries TeamSQL Queries Team
Type
Projects
Status
Done