diff options
| author | Fujii Masao | 2025-11-14 13:40:39 +0000 |
|---|---|---|
| committer | Fujii Masao | 2025-11-14 13:40:39 +0000 |
| commit | 4aa0ac05765edf6b5f0c13e18ac677287ce78206 (patch) | |
| tree | 20c970e0f9d7c0fb110ed729a92920544aa017e8 /src/backend/commands/vacuumparallel.c | |
| parent | e4018f891dec09ff95ac97e5b1a2307349aeeffa (diff) | |
Previously, when pgbench ran a custom script that triggered retriable errors
(e.g., deadlocks) followed by multiple \syncpipeline commands in pipeline mode,
the following assertion failure could occur:
Assertion failed: (res == ((void*)0)), function discardUntilSync, file pgbench.c, line 3594.
The issue was that discardUntilSync() assumed a pipeline sync result
(PGRES_PIPELINE_SYNC) would always be followed by either another sync result
or NULL. This assumption was incorrect: when multiple sync requests were sent,
a sync result could instead be followed by another result type. In such cases,
discardUntilSync() mishandled the results, leading to the assertion failure.
This commit fixes the issue by making discardUntilSync() correctly handle cases
where a pipeline sync result is followed by other result types. It now continues
discarding results until another pipeline sync followed by NULL is reached.
Backpatched to v17, where support for \syncpipeline command in pgbench was
introduced.
Author: Yugo Nagata <[email protected]>
Reviewed-by: Chao Li <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 17
Diffstat (limited to 'src/backend/commands/vacuumparallel.c')
0 files changed, 0 insertions, 0 deletions
