mirror of https://github.com/citusdata/citus.git
31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
-- Citus upgrades are finished by calling a procedure
|
|
-- this is a transactional procedure, so rollback should be fine
|
|
BEGIN;
|
|
CALL citus_finish_citus_upgrade();
|
|
NOTICE: already at the latest distributed schema version (12.1-1)
|
|
ROLLBACK;
|
|
-- do the actual job
|
|
CALL citus_finish_citus_upgrade();
|
|
NOTICE: already at the latest distributed schema version (12.1-1)
|
|
-- show that the upgrade is successfull
|
|
SELECT metadata->>'last_upgrade_version' = extversion
|
|
FROM pg_dist_node_metadata, pg_extension WHERE extname = 'citus';
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
f
|
|
(1 row)
|
|
|
|
-- idempotent, should be called multiple times
|
|
-- still, do not NOTICE the version as it changes per release
|
|
SET client_min_messages TO WARNING;
|
|
CALL citus_finish_citus_upgrade();
|
|
-- we should be able to sync metadata in nontransactional way as well
|
|
SET citus.metadata_sync_mode TO 'nontransactional';
|
|
SELECT start_metadata_sync_to_all_nodes();
|
|
start_metadata_sync_to_all_nodes
|
|
---------------------------------------------------------------------
|
|
t
|
|
(1 row)
|
|
|
|
RESET citus.metadata_sync_mode;
|