Bump Go from 1.24 to 1.25#99
Open
tuhaihe wants to merge 10 commits into
Open
Conversation
woblerr
reviewed
May 15, 2026
The test held locks with raw BEGIN/COMMIT SQL on DBConn and then reused the same connection for polling. With pgx v5 this can release the raw transaction lock, so gpbackup was not blocked and the test observed 0 deadlock traps. Use explicit DBConn transactions, separate polling connections, wait for goroutines before closing connections, and wait for the expected 2 blocked AccessExclusiveLock requests.
After moving to pgx v5, database errors are returned as pgx/v5/pgconn.PgError. The old jackc/pgconn type assertions no longer matched, so backup lock handling could treat unexpected errors as lock-not-available, and restore COPY errors could lose their CONTEXT. Use errors.As with pgx/v5 pgconn in backup and restore code, update the restore test, and remove the old pgconn dependency.
The deadlock and signal handler e2e tests still held locks with raw BEGIN/COMMIT SQL on DBConn and reused those connections for pg_locks polling. With pgx v5 this can release the raw transaction lock or leave goroutines polling on closed connections, causing missing blocked-lock counts and DBConn.Get panics. Use explicit transactions, dedicated lock and polling connections, and synchronize goroutines before closing test connections.
The test intended to verify that gpbackup does not keep a lock on pg_catalog.gp_segment_configuration after passing that metadata query and blocking later on pg_catalog.pg_trigger. However, the old test did not actually exercise that state: it used raw BEGIN/COMMIT SQL through DBConn, committed before gpbackup was started, queried pg_locks in an unsynchronized goroutine, and ignored query errors while scanning SELECT * into an int. Use an explicit DBConn transaction on a dedicated lock connection, start gpbackup while the pg_trigger lock is still held, wait until gpbackup is visibly blocked on pg_trigger, and then synchronously assert that no gp_segment_configuration locks remain. Finally release pg_trigger and verify gpbackup completes successfully.
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.
closes: #ISSUE_Number
Change logs
Contributor's checklist
Here are some reminders before you submit your pull request: