Skip to content

Commit

Permalink
Fix failed update with parallel workers
Browse files Browse the repository at this point in the history
When executing "ALTER EXTENSION timescaledb UPDATE TO ..." it will fail
if parallel workers spawn for the update itself. Disable parallel
execution during the update.
  • Loading branch information
mfundul committed Jun 15, 2021
1 parent 6d6172b commit b64c82d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sql/updates/pre-update.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

-- This file is always prepended to all upgrade scripts.

-- Disable parallel execution for the duration of the update process.
-- This avoids version mismatch errors that would have beeen triggered by the
-- parallel workers in ts_extension_check_version().
SET LOCAL max_parallel_workers = 0;

-- Triggers should be disabled during upgrades to avoid having them
-- invoke functions that might load an old version of the shared
-- library before those functions have been updated.
Expand Down

0 comments on commit b64c82d

Please sign in to comment.