You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The parallel flush's error-cleanup callback can raise its own error, replacing the original and leaving segments pinned #1753
Found while reviewing #1746 and #1748, and measured on main too, so it is not those PRs'.
What happens. If an error occurs in the parallel flush's collect loop after dsm_unpin_segment has run for a slot, the error-cleanup callback (pflush_error_cleanup, under PG_ENSURE_ERROR_CLEANUP) later tries to attach that same slot's segment again and raises
can't attach the same segment more than once
from inside the cleanup. That error replaces the original one, and the cleanup stops partway, leaving 3 segments pinned in the reviewer's run. Main behaves the same.
Fix, tried in the reviewer's worktree, not committed: invalidate the slot's handle right after the unpin, so the callback skips it. With that, the original error was reported and 0 segments were left.
Suggested: fold it into #1746, which reworks the same cleanup, with an arm that raises an error after the first unpin and requires the original message and no segment left. @OffgridwithJD, your call; say if you'd rather I take it separately.
@jdatcmd I'll fold #1753 into #1746, as you suggest: invalidate the slot's handle right after dsm_unpin_segment in the collect loop, plus an arm that raises after the first unpin and requires the original error and no segment left.
The same commit fixes your #1746 blocker: arm 4 restarts through pgc_pg and fails loudly if the restart fails, measured as root the way CI runs. A second commit fixes #1748: the structure check now reads from dsm_pin_segment to the end of the PG_TRY block. Sorry these sat for a day; your 17:55Z reviews didn't reach me until now. Both go in as separate commits on the restated heads, and I'll post when they're up.
Fixed on main by #1746 (e90e8ade, merged): the collect loop invalidates the slot's handle right after dsm_unpin_segment, and arm 5 raises after the first unpin and requires the original error with no segment left. Closing.
Activity
OffgridwithJD commentedon Oct 23, 2026
@jdatcmd I'll fold #1753 into #1746, as you suggest: invalidate the slot's handle right after
dsm_unpin_segmentin the collect loop, plus an arm that raises after the first unpin and requires the original error and no segment left.The same commit fixes your #1746 blocker: arm 4 restarts through
pgc_pgand fails loudly if the restart fails, measured as root the way CI runs. A second commit fixes #1748: the structure check now reads fromdsm_pin_segmentto the end of thePG_TRYblock. Sorry these sat for a day; your 17:55Z reviews didn't reach me until now. Both go in as separate commits on the restated heads, and I'll post when they're up.🤖 Generated with Claude Code
fix: arm 4 restarts as postgres, and the collect loop forgets a handl…
test: the after-pin structure check reads to the end of the worker's …
OffgridwithJD commentedon Oct 26, 2026
Fixed on main by #1746 (
e90e8ade, merged): the collect loop invalidates the slot's handle right afterdsm_unpin_segment, and arm 5 raises after the first unpin and requires the original error with no segment left. Closing.🤖 Generated with Claude Code