-
Notifications
You must be signed in to change notification settings - Fork 679
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce downgrade scripts for 9.3 versions (#4051)
Here are the updated make targets: - install: install everything except downgrade scripts. - install-downgrades: build and install only the downgrade migration scripts. - install-all: install everything along with the downgrade migration scripts. (cherry picked from commit 315b323) This commit is heavily modified to support an earlier release version. - Downgrade scripts that are relevant for versions 9.4+ are stripped - multi_extension tests are copied from master and then stripped
- Loading branch information
Showing
6 changed files
with
385 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/backend/distributed/sql/downgrades/citus--9.2-4--9.2-2.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- citus--9.2-4--9.2-2 | ||
-- this is an empty downgrade path since citus--9.2-2--9.2-4.sql is empty |
30 changes: 30 additions & 0 deletions
30
src/backend/distributed/sql/downgrades/citus--9.3-2--9.2-4.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-- citus--9.3-2--9.2-4 | ||
-- this is a downgrade path that will revert the changes made in citus--9.2-4--9.3-2.sql | ||
-- | ||
-- 9.3-2 added citus extension owner as a distributed object, if not already in there. | ||
-- However we can not really know if it was a distributed owner prior to 9.3-2. | ||
-- That's why we leave the record in place. | ||
|
||
-- Revert the return type to void | ||
DROP FUNCTION pg_catalog.citus_extradata_container(INTERNAL); | ||
CREATE FUNCTION pg_catalog.citus_extradata_container(INTERNAL) | ||
RETURNS void | ||
LANGUAGE C | ||
AS 'MODULE_PATHNAME', $$citus_extradata_container$$; | ||
COMMENT ON FUNCTION pg_catalog.citus_extradata_container(INTERNAL) | ||
IS 'placeholder function to store additional data in postgres node trees'; | ||
|
||
-- Remove newly introduced functions that are absent in earlier versions | ||
DROP FUNCTION pg_catalog.update_distributed_table_colocation(regclass, text); | ||
DROP FUNCTION pg_catalog.replicate_reference_tables(); | ||
DROP FUNCTION pg_catalog.citus_remote_connection_stats( | ||
OUT hostname text, | ||
OUT port int, | ||
OUT database_name text, | ||
OUT connection_count_to_node int); | ||
DROP FUNCTION pg_catalog.worker_create_or_alter_role( | ||
role_name text, | ||
create_role_utility_query text, | ||
alter_role_utility_query text); | ||
DROP FUNCTION pg_catalog.truncate_local_data_after_distributing_table( | ||
function_name regclass); |
Oops, something went wrong.