diff --git a/src/test/regress/expected/multi_extension.out b/src/test/regress/expected/multi_extension.out index 8e17c1c2c..ac7cfb24a 100644 --- a/src/test/regress/expected/multi_extension.out +++ b/src/test/regress/expected/multi_extension.out @@ -168,7 +168,31 @@ SET citus.enable_version_checks TO 'true'; DROP FUNCTION citus_table_size(regclass); SET citus.enable_version_checks TO 'false'; ALTER EXTENSION citus UPDATE TO '6.2-2'; +-- Test updating to the latest version without specifying the version number +ALTER EXTENSION citus UPDATE; -- re-create in newest version DROP EXTENSION citus; \c CREATE EXTENSION citus; +-- test cache invalidation in workers +\c - - - :worker_1_port +-- this will initialize the cache +\d + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +DROP EXTENSION citus; +SET citus.enable_version_checks TO 'false'; +CREATE EXTENSION citus VERSION '5.2-4'; +SET citus.enable_version_checks TO 'true'; +-- during ALTER EXTENSION, we should invalidate the cache +ALTER EXTENSION citus UPDATE; +-- if cache is invalidated succesfull, this \d should work without any problem +\d + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + diff --git a/src/test/regress/sql/multi_extension.sql b/src/test/regress/sql/multi_extension.sql index 50b7eeefb..294cf4405 100644 --- a/src/test/regress/sql/multi_extension.sql +++ b/src/test/regress/sql/multi_extension.sql @@ -152,7 +152,25 @@ DROP FUNCTION citus_table_size(regclass); SET citus.enable_version_checks TO 'false'; ALTER EXTENSION citus UPDATE TO '6.2-2'; +-- Test updating to the latest version without specifying the version number +ALTER EXTENSION citus UPDATE; + -- re-create in newest version DROP EXTENSION citus; \c CREATE EXTENSION citus; + +-- test cache invalidation in workers +\c - - - :worker_1_port + +-- this will initialize the cache +\d +DROP EXTENSION citus; +SET citus.enable_version_checks TO 'false'; +CREATE EXTENSION citus VERSION '5.2-4'; +SET citus.enable_version_checks TO 'true'; +-- during ALTER EXTENSION, we should invalidate the cache +ALTER EXTENSION citus UPDATE; + +-- if cache is invalidated succesfull, this \d should work without any problem +\d