Skip to content

fix(backup): Use standard LOCK TABLE syntax for Cloudberry#28

Merged
gfphoenix78 merged 1 commit intoapache:sync-with-upstreamfrom
robertmu:lock-table
Aug 28, 2025
Merged

fix(backup): Use standard LOCK TABLE syntax for Cloudberry#28
gfphoenix78 merged 1 commit intoapache:sync-with-upstreamfrom
robertmu:lock-table

Conversation

@robertmu
Copy link
Copy Markdown
Contributor

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

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 gfphoenix78 merged commit 2bc6f7a into apache:sync-with-upstream Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants