Skip to content

sql: defer FK checks to end of statement #33475

@knz

Description

@knz

Discussed with @BramGruneir and team. The current semantics in CRDB 2.1 are incorrect -- the FK work must be deferred to no earlier than the end of the current statement.

In the first iteration of this we are reusing the same FK code; and instead delay the processing until the end of the statement's execution by means of callbacks.

Also the set of modified rows must be collected using a "disk row writer" that spills to disk to limit RAM usage.

Metadata

Metadata

Assignees

Labels

A-sql-executionRelating to SQL execution.A-sql-fksA-sql-mutationsMutation statements: UPDATE/INSERT/UPSERT/DELETE.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions