Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#18822] YSQL: Write out unmodified cols to main table when update op…
…timizations are enabled Summary: D34040 introduced a framework to skip redundant secondary index updates and foreign key checks. As a part of the implementation, this revision skipped writing out unmodified columns to the main table. For correctness reasons, skipping writes of specific columns to the main table requires the acquisition of row-level locks. (In the event that no columns are modified, one is still required to acquire a row lock on the affected row) This created a dependency between the update optimization and the row locking feature. The latter is controlled by the autoflag `ysql_skip_row_lock_for_update`. This revision seeks to remove this dependency by continuing to write out unmodified columns to the main table. There is one notable exception to this behavior: unmodified columns that are a part of the primary key. If the value of the primary key remains unmodified, its columns are not written out to the main table as this would require an extra round trip to the storage layer. Jira: DB-7701 Test Plan: Run the following tests and ensure that there are no regressions: ``` ./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressUpdateOptimized#schedule' ``` Reviewers: amartsinchyk Reviewed By: amartsinchyk Subscribers: smishra, yql Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D37545
- Loading branch information