Skip to content

Optimize lock for select-for-update and similar queries#1047

Merged
my-ship-it merged 1 commit intoapache:mainfrom
HuSen8891:select_for_update
Apr 14, 2025
Merged

Optimize lock for select-for-update and similar queries#1047
my-ship-it merged 1 commit intoapache:mainfrom
HuSen8891:select_for_update

Conversation

@HuSen8891
Copy link
Copy Markdown
Contributor

Add GUC 'enable_lock_optimization' to enable lock optimization for select-for-update and similar queries. If the lock for query can be optimized, we use tuple lock instead of relation lock to improve concurrency performance.

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


@HuSen8891 HuSen8891 added the type: Performance cloudberry runs slow on some particular query label Apr 11, 2025
@HuSen8891 HuSen8891 marked this pull request as draft April 11, 2025 06:57
@HuSen8891 HuSen8891 force-pushed the select_for_update branch 2 times, most recently from bcbb557 to 119a1b3 Compare April 11, 2025 08:13
@HuSen8891 HuSen8891 marked this pull request as ready for review April 14, 2025 03:18
Add GUC 'enable_lock_optimization' to enable lock optimization for
select-for-update and similar queries. If the lock for query can be
optimized, we use tuple lock instead of relation lock to improve
concurrency performance.
@my-ship-it my-ship-it merged commit f8a46dc into apache:main Apr 14, 2025
22 checks passed
@HuSen8891 HuSen8891 deleted the select_for_update branch August 22, 2025 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Performance cloudberry runs slow on some particular query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants