From b64c82d2bc4bf464d7d6d7d9c523eb2c0f6c6e09 Mon Sep 17 00:00:00 2001 From: Markos Fountoulakis Date: Tue, 1 Jun 2021 17:24:28 +0300 Subject: [PATCH] Fix failed update with parallel workers When executing "ALTER EXTENSION timescaledb UPDATE TO ..." it will fail if parallel workers spawn for the update itself. Disable parallel execution during the update. --- sql/updates/pre-update.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql/updates/pre-update.sql b/sql/updates/pre-update.sql index ada807addeb..7bd9cd87004 100644 --- a/sql/updates/pre-update.sql +++ b/sql/updates/pre-update.sql @@ -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.