Improve multinode detection in update script

Previously we would only check for data nodes defined or distributed
hypertables being present which might not be true on data nodes so
we prevent update on any installation that has dist_uuid defined which
is also true on data nodes.
This commit is contained in:
Sven Klemm 2024-01-11 14:24:21 +01:00 committed by Sven Klemm
parent f08dd10425
commit 75cc4f7d7b

View File

@ -28,6 +28,13 @@ BEGIN
MESSAGE = 'cannot upgrade because multi-node has been removed in 2.14.0',
DETAIL = 'The following data nodes should be removed: '||data_nodes;
END IF;
IF EXISTS(SELECT FROM _timescaledb_catalog.metadata WHERE key = 'dist_uuid') THEN
RAISE USING
ERRCODE = 'feature_not_supported',
MESSAGE = 'cannot upgrade because multi-node has been removed in 2.14.0',
DETAIL = 'This node appears to be part of a multi-node installation';
END IF;
END $$;
DROP FUNCTION IF EXISTS _timescaledb_functions.ping_data_node;