fix(backup): Use standard LOCK TABLE syntax for Cloudberry#28
Merged
gfphoenix78 merged 1 commit intoapache:sync-with-upstreamfrom Aug 28, 2025
Merged
fix(backup): Use standard LOCK TABLE syntax for Cloudberry#28gfphoenix78 merged 1 commit intoapache:sync-with-upstreamfrom
gfphoenix78 merged 1 commit intoapache:sync-with-upstreamfrom
Conversation
Temporarily modifies the table locking logic to use a standard `LOCK TABLE ... IN ACCESS SHARE MODE` command when running against Cloudberry. This change is necessary because Cloudberry, which is based on PostgreSQL 14, does not support the `COORDINATOR ONLY` clause that was introduced in GPDB 7 as a performance optimization. The use of this unsupported syntax was causing `gpbackup` to panic during the initial table locking phase. A TODO comment has been added to both modified functions (`LockTables` and `LockTableNoWait`) to indicate that this is a workaround. The logic should be reverted to use the `COORDINATOR ONLY` optimization once Cloudberry implements this feature for feature and performance parity with GPDB 7. See apache/cloudberry#1265
gfphoenix78
approved these changes
Aug 28, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Temporarily modifies the table locking logic to use a standard
LOCK TABLE ... IN ACCESS SHARE MODEcommand when running against Cloudberry.This change is necessary because Cloudberry, which is based on PostgreSQL 14, does not support the
COORDINATOR ONLYclause that was introduced in GPDB 7 as a performance optimization. The use of this unsupported syntax was causinggpbackupto panic during the initial table locking phase.A TODO comment has been added to both modified functions (
LockTablesandLockTableNoWait) to indicate that this is a workaround. The logic should be reverted to use theCOORDINATOR ONLYoptimization once Cloudberry implements this feature for feature and performance parity with GPDB 7.See apache/cloudberry#1265