Fix update/rollback failed with dolphin.

This commit is contained in:
totaj
2023-08-24 17:38:31 +08:00
parent 6171ce87a5
commit f3ee5c5efa
8 changed files with 112 additions and 2 deletions

View File

@ -37,8 +37,10 @@
./share/postgresql/extension/dolphin--1.0.sql
./share/postgresql/extension/dolphin--1.0--2.0.sql
./share/postgresql/extension/dolphin--2.0--1.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--1.1--2.0.sql
./share/postgresql/extension/dolphin--2.0--1.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir
./share/postgresql/extension/file_fdw--1.0.sql
./share/postgresql/extension/plpgsql.control

View File

@ -76,8 +76,10 @@
./share/postgresql/extension/dolphin--1.0.sql
./share/postgresql/extension/dolphin--1.0--2.0.sql
./share/postgresql/extension/dolphin--2.0--1.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--1.1--2.0.sql
./share/postgresql/extension/dolphin--2.0--1.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir
./share/postgresql/extension/assessment--1.0.sql
./share/postgresql/extension/assessment.control

View File

@ -37,8 +37,10 @@
./share/postgresql/extension/dolphin--1.0.sql
./share/postgresql/extension/dolphin--1.0--2.0.sql
./share/postgresql/extension/dolphin--2.0--1.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--1.1--2.0.sql
./share/postgresql/extension/dolphin--2.0--1.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir
./share/postgresql/extension/file_fdw--1.0.sql
./share/postgresql/extension/plpgsql.control

View File

@ -76,8 +76,10 @@
./share/postgresql/extension/dolphin--1.0.sql
./share/postgresql/extension/dolphin--1.0--2.0.sql
./share/postgresql/extension/dolphin--2.0--1.0.sql
./share/postgresql/extension/dolphin--2.0--2.0.1.sql
./share/postgresql/extension/dolphin--1.1--2.0.sql
./share/postgresql/extension/dolphin--2.0--1.1.sql
./share/postgresql/extension/dolphin--2.0.1--2.0.sql
./share/postgresql/extension/openGauss_expr_dolphin.ir
./share/postgresql/extension/assessment--1.0.sql
./share/postgresql/extension/assessment.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' and extversion = '2.0')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '2.0.1';
end if;
exit;
END LOOP;
END$$;
DROP FUNCTION IF EXISTS pg_catalog.ss_txnstatus_cache_stat() CASCADE;
-- those type of view and producer will recreate.
@ -954,3 +967,16 @@ GRANT SELECT ON TABLE DBE_PERF.summary_statement TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.global_slow_query_history TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.global_slow_query_info TO PUBLIC;
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' and extversion = '2.0.1')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '2.0';
end if;
exit;
END LOOP;
END$$;

View File

@ -1,3 +1,15 @@
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' and extversion = '2.0')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '2.0.1';
end if;
exit;
END LOOP;
END$$;
DROP FUNCTION IF EXISTS pg_catalog.ss_txnstatus_cache_stat() CASCADE;
-- those type of view and producer will recreate.
@ -955,3 +967,15 @@ GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.global_slow_query_history TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.global_slow_query_info TO PUBLIC;
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' and extversion = '2.0.1')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '2.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' and extversion = '2.0')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '2.0.1';
end if;
exit;
END LOOP;
END$$;
DROP FUNCTION IF EXISTS pg_catalog.ss_txnstatus_cache_stat() CASCADE;
SET LOCAL inplace_upgrade_next_system_object_oids = IUO_PROC, 8888;
CREATE FUNCTION pg_catalog.ss_txnstatus_cache_stat(
@ -1139,4 +1152,17 @@ GRANT SELECT ON TABLE DBE_PERF.STATEMENT TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.summary_statement TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.global_slow_query_history TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.global_slow_query_info TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.global_slow_query_info TO PUBLIC;
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' and extversion = '2.0.1')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '2.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' and extversion = '2.0')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '2.0.1';
end if;
exit;
END LOOP;
END$$;
DROP FUNCTION IF EXISTS pg_catalog.ss_txnstatus_cache_stat() CASCADE;
SET LOCAL inplace_upgrade_next_system_object_oids = IUO_PROC, 8888;
CREATE FUNCTION pg_catalog.ss_txnstatus_cache_stat(
@ -1139,4 +1152,17 @@ GRANT SELECT ON TABLE DBE_PERF.STATEMENT TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.summary_statement TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.global_slow_query_history TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.global_slow_query_info TO PUBLIC;
GRANT SELECT ON TABLE DBE_PERF.global_slow_query_info TO PUBLIC;
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' and extversion = '2.0.1')
LOOP
if ans = true then
ALTER EXTENSION dolphin UPDATE TO '2.0';
end if;
exit;
END LOOP;
END$$;