修复dolphin因DBE_PERF.statement重建而升级失败的问题

This commit is contained in:
chenxiaobin19
2024-08-05 11:32:22 +08:00
parent 9d51b9a167
commit 081ef521bc
12 changed files with 128 additions and 4 deletions

View File

@ -144,6 +144,12 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/contrib/dolphin)
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--2.0.1--2.0.sql
DESTINATION share/postgresql/extension/
)
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--4.0--4.0.1.sql
DESTINATION share/postgresql/extension/
)
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--4.0.1--4.0.sql
DESTINATION share/postgresql/extension/
)
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/openGauss_expr_dolphin.ir
DESTINATION share/postgresql/extension/
)

View File

@ -86,6 +86,8 @@
./share/postgresql/extension/dolphin--4.0--3.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/dolphin--4.0--4.0.1.sql
./share/postgresql/extension/dolphin--4.0.1--4.0.sql
./share/postgresql/extension/whale.control
./share/postgresql/extension/whale--1.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir

View File

@ -45,6 +45,8 @@
./share/postgresql/extension/dolphin--4.0--3.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/dolphin--4.0--4.0.1.sql
./share/postgresql/extension/dolphin--4.0.1--4.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir
./share/postgresql/extension/file_fdw--1.0.sql
./share/postgresql/extension/plpgsql.control

View File

@ -89,6 +89,8 @@
./share/postgresql/extension/dolphin--4.0--3.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/dolphin--4.0--4.0.1.sql
./share/postgresql/extension/dolphin--4.0.1--4.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir
./share/postgresql/extension/age--1.0.0.sql
./share/postgresql/extension/age.control

View File

@ -75,6 +75,8 @@
./share/postgresql/extension/dolphin--4.0--3.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/dolphin--4.0--4.0.1.sql
./share/postgresql/extension/dolphin--4.0.1--4.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir
./share/postgresql/extension/age--1.0.0.sql
./share/postgresql/extension/age.control

View File

@ -86,6 +86,8 @@
./share/postgresql/extension/dolphin--4.0--3.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/dolphin--4.0--4.0.1.sql
./share/postgresql/extension/dolphin--4.0.1--4.0.sql
./share/postgresql/extension/whale.control
./share/postgresql/extension/whale--1.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir

View File

@ -45,6 +45,8 @@
./share/postgresql/extension/dolphin--4.0--3.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/dolphin--4.0--4.0.1.sql
./share/postgresql/extension/dolphin--4.0.1--4.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir
./share/postgresql/extension/file_fdw--1.0.sql
./share/postgresql/extension/plpgsql.control

View File

@ -87,6 +87,8 @@
./share/postgresql/extension/dolphin--4.0--3.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/dolphin--4.0--4.0.1.sql
./share/postgresql/extension/dolphin--4.0.1--4.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir
./share/postgresql/extension/age--1.0.0.sql
./share/postgresql/extension/age.control

View File

@ -1,3 +1,16 @@
do $$
DECLARE
ans boolean;
BEGIN
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '4.0.1';
end if;
exit;
END LOOP;
END$$;
DO $DO$
DECLARE
ans boolean;
@ -692,4 +705,17 @@ CREATE OR REPLACE FUNCTION DBE_PERF.get_global_full_sql_by_timestamp
GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC;
END IF;
END IF;
END $DO$;
END $DO$;
do $$
DECLARE
ans boolean;
BEGIN
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '4.0';
end if;
exit;
END LOOP;
END$$;

View File

@ -1,3 +1,16 @@
do $$
DECLARE
ans boolean;
BEGIN
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '4.0.1';
end if;
exit;
END LOOP;
END$$;
DO $DO$
DECLARE
ans boolean;
@ -692,4 +705,17 @@ CREATE OR REPLACE FUNCTION DBE_PERF.get_global_full_sql_by_timestamp
GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC;
END IF;
END IF;
END $DO$;
END $DO$;
do $$
DECLARE
ans boolean;
BEGIN
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '4.0';
end if;
exit;
END LOOP;
END$$;

View File

@ -1,3 +1,16 @@
do $$
DECLARE
ans boolean;
BEGIN
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '4.0.1';
end if;
exit;
END LOOP;
END$$;
DO $DO$
DECLARE
ans boolean;
@ -700,4 +713,17 @@ CREATE OR REPLACE FUNCTION DBE_PERF.get_global_full_sql_by_timestamp
GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC;
END IF;
END IF;
END $DO$;
END $DO$;
do $$
DECLARE
ans boolean;
BEGIN
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '4.0';
end if;
exit;
END LOOP;
END$$;

View File

@ -1,3 +1,16 @@
do $$
DECLARE
ans boolean;
BEGIN
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '4.0.1';
end if;
exit;
END LOOP;
END$$;
DO $DO$
DECLARE
ans boolean;
@ -700,4 +713,17 @@ CREATE OR REPLACE FUNCTION DBE_PERF.get_global_full_sql_by_timestamp
GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC;
END IF;
END IF;
END $DO$;
END $DO$;
do $$
DECLARE
ans boolean;
BEGIN
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '4.0';
end if;
exit;
END LOOP;
END$$;