提交 c296bdb3 编写于 作者: H Heikki Linnakangas

Remove tests related to obsolete upgrade scripts.

Unused leftover stuff.
上级 ca45434d
......@@ -167,10 +167,10 @@ pg_regress_call = ./pg_regress --inputdir=$(srcdir) --multibyte=$(MULTIBYTE) $(M
pg_regress_call_bb = ./pg_regress --inputdir=$(srcdir)/bugbuster --outputdir=$(srcdir)/bugbuster --multibyte=$(MULTIBYTE) $(MAXCONNOPT) $(NOLOCALE) --init-file=$(srcdir)/init_file
pg_regress_call_opt = ./pg_regress --inputdir=$(srcdir)/optfunctional --outputdir=$(srcdir)/optfunctional --multibyte=$(MULTIBYTE) $(MAXCONNOPT) $(NOLOCALE) --init-file=$(srcdir)/optfunctional/init_file
check: all upg2-setup ugpart-setup
check: all
$(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir=$(abs_srcdir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule
installcheck: all upg2-setup ugpart-setup
installcheck: all
$(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --srcdir=$(abs_srcdir)
installcheck-good: all
......@@ -208,30 +208,6 @@ installcheck-bugbuster: all
$(srcdir)/sql/orca_udfs.sql: $(srcdir)/sql/orca_udfs.sql.in
sed -e 's,%%GPOPTUTILS_NAMESPACE%%,orcaudftest,g; s,%%EXT%%,$(LDSFX),g' $(srcdir)/sql/orca_udfs.sql.in > $(srcdir)/sql/orca_udfs.sql
# Copy and transform all of the upgrade related data files
# For upgrade installcheck-good test, we need to get rid of
# 1. WITH clause (because create table doesn't like tidycat definition)
# 2. tablespace pg_global
# 3. (oid=...)
upg2-setup:
rm -rf data/upg_catupgrade_43.sql
perl -pi \
-e 's/(, )?(indexid|relid|reltype_oid|toast_oid|toast_index|toast_relid|toast_reltype|shared|CamelCase)=[0-9a-zA-Z]+//gi;' \
-e 's/oid=false//g;' \
-e 's/with \([^a-zA-Z]*\)//g;' \
-e 's/\(oid=[0-9]+\)//;' \
-e 's/tablespace pg_global//g;' \
-e 's/oids=true, /oids=true/;' \
-e 's/\(,/(/;' \
< $(srcdir)/data/upgrade43/upg2_catupgrade_43.sql.in \
> data/upg_catupgrade_43.sql
@gpstringsubs.pl data/upg_catupgrade_43.sql
ugpart-setup:
@cp -f $(srcdir)/data/upgrade_pg_partitions.sql.in data/upgrade_pg_partitions.sql
@gpstringsubs.pl data/upgrade_pg_partitions.sql
# old interfaces follow...
runcheck: check
......@@ -272,11 +248,7 @@ clean distclean maintainer-clean: clean-lib
rm -f regression.diffs regression.out regress.out run_check.out
rm -f bugbuster/regression.diffs bugbuster/regression.out
rm -f data/pg_class32.data
rm -f input/loadcat33.source
rm -f input/loadcat34.source
rm -f input/loadcat34_sh.source
rm -f gmon.out
rm -f $(upg2_temp_files)
rm -f $(srcdir)/sql/cppudf.sql
ifeq ($(PORTNAME), cygwin)
rm -f regress.def
......
pg_class33.data
pg_namespace32.data.in
pg_namespace33.data
pg_namespace33.data.in
pg_proc32.data
pg_proc33.data
pg_rewrite32.data
pg_rewrite33.data
pg_shdepend32.data
pg_shdepend33.data
pg_shdescription32.data
pg_shdescription33.data
pg_type32.data
pg_type33.data
pg_aggregate32.data
pg_aggregate33.data
pg_attribute32.data
pg_attribute33.data
pg_class32.data.in
pg_class33.data
pg_class33.data.in
pg_conversion32.data
pg_conversion33.data
pg_depend32.data
pg_depend33.data
pg_description32.data
pg_description33.data
pg_index32.data
pg_index33.data
pg_namespace32.data
pg_namespace32.data.in
pg_namespace33.data
pg_namespace33.data.in
pg_proc32.data
pg_proc33.data
pg_rewrite32.data
pg_rewrite33.data
pg_shdepend32.data
pg_shdepend33.data
pg_shdescription32.data
pg_shdescription33.data
pg_type32.data
pg_type33.data
upg2_conversion32.sql
upg2_conversion32.sql.in
upg2_pg_attribute_toadd32.data
upg2_pg_attribute_toadd32.data.in
upg2_pg_attribute_toadd33.data
upg2_pg_attribute_toadd33.data.in
upg2_pg_class_toadd32.data
upg2_pg_class_toadd32.data.in
upg2_pg_class_toadd33.data
upg2_pg_class_toadd33.data.in
upg2_pg_depend_toadd32.data
upg2_pg_depend_toadd33.data
upg2_pg_description_toadd32.data
upg2_pg_description_toadd33.data
upg2_pg_index_toadd32.data
upg2_pg_index_toadd32.data.in
upg2_pg_index_toadd33.data
upg2_pg_index_toadd33.data.in
upg2_pg_namespace_toadd32.data
upg2_pg_namespace_toadd33.data
upg2_pg_proc_toadd32.data
upg2_pg_proc_toadd33.data
upg2_pg_type_toadd32.data
upg2_pg_type_toadd32.data.in
upg2_pg_type_toadd33.data
upg2_pg_type_toadd33.data.in
upgrade_pg_partitions.sql
upg_catupgrade_*.sql
pg_class32.data
wet_region.out
delete from upg_catalog.pg_conversion where conname in ('euc_jis_2004_to_shift_jis_2004', 'euc_jis_2004_to_utf8', 'koi8_u_to_utf8', 'utf8_to_koi8_u', 'shift_jis_2004_to_utf8', 'shift_jis_2004_to_euc_jis_2004', 'utf8_to_euc_jis_2004', 'utf8_to_shift_jis_2004');
update upg_catalog.pg_conversion set conforencoding = 5 where conforencoding = 40;
update upg_catalog.pg_conversion set contoencoding = 5 where contoencoding = 40;
update upg_catalog.pg_conversion set conforencoding = conforencoding - 1 where conforencoding >= 34;
update upg_catalog.pg_conversion set contoencoding = contoencoding - 1 where contoencoding >= 34;
DROP FUNCTION upg_catalog.euc_jis_2004_to_shift_jis_2004 (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER);
DROP FUNCTION upg_catalog.shift_jis_2004_to_euc_jis_2004 (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER);
DROP FUNCTION upg_catalog.utf8_to_shift_jis_2004 (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER);
DROP FUNCTION upg_catalog.shift_jis_2004_to_utf8 (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER);
DROP FUNCTION upg_catalog.utf8_to_euc_jis_2004 (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER);
DROP FUNCTION upg_catalog.euc_jis_2004_to_utf8 (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER);
DROP FUNCTION upg_catalog.utf8_to_koi8u (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER);
DROP FUNCTION upg_catalog.koi8u_to_utf8 (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER);
......@@ -85,10 +85,6 @@ The tokens are:
Replace @gpcurusername@ with the username of the user executing the script.
=item gpupgradedatadir
Replace @gpupgradedatadir@ with /path/to/regression/data/
=back
......@@ -338,8 +334,6 @@ if (1)
my $hostexp = '\\@hostname\\@';
my $unexp = '\\@gpcurusername\\@';
my $infoschema = '\\@gpinfoschemaname\\@';
my $ugdir = '\\@gpupgradedatadir\\@';
my $gpglobconn = '\\@gp_glob_connect\\@';
my $gpfspace_all = `grep gpfilespace_ $filnam`;
......@@ -348,7 +342,7 @@ if (1)
chomp $curdir;
# print "$filnam\n";
system "perl -i -ple \' s/$hostexp/$hostname/gm; s/$unexp/$username/gm; s/$infoschema/upg_information/gm; s,$ugdir,$curdir/data/upgrade43,gm; s/$gpglobconn/$glob_connect/gm; \' $filnam\n";
system "perl -i -ple \' s/$hostexp/$hostname/gm; s/$unexp/$username/gm; s/$gpglobconn/$glob_connect/gm; \' $filnam\n";
# replace filespace
if (defined($gpfspace_all) && length($gpfspace_all))
......
loadcat33.source
loadcat34.source
loadcat33.source
loadcat34.source
begin;
copy upg_catalog.pg_class from '@gpupgradedatadir@/upg2_pg_class_toadd32.data' oids null E'\\N' csv delimiter '|' header;
copy upg_catalog.pg_attribute from '@gpupgradedatadir@/upg2_pg_attribute_toadd32.data' csv delimiter '|' header;
copy upg_catalog.pg_index from '@gpupgradedatadir@/upg2_pg_index_toadd32.data' null as E'\\N' csv delimiter '|' header;
copy upg_catalog.pg_type from '@gpupgradedatadir@/upg2_pg_type_toadd32.data' oids null as E'\\N' csv delimiter '|' header;
copy upg_catalog.pg_proc from '@gpupgradedatadir@/upg2_pg_proc_toadd32.data' oids null as E'\\N' csv delimiter '|' header;
copy upg_catalog.pg_namespace from '@gpupgradedatadir@/upg2_pg_namespace_toadd32.data' oids null as E'\\N' csv delimiter '|' header;
copy upg_catalog.pg_description from '@gpupgradedatadir@/upg2_pg_description_toadd32.data' null as E'\\N' csv delimiter '|' header;
copy upg_catalog.pg_depend from '@gpupgradedatadir@/upg2_pg_depend_toadd32.data' null as E'\\N' csv delimiter '|' header;
-- fix up pg_appendonly
alter table upg_catalog.pg_appendonly add column compresstype text;
-- adjust 3.2 quicklz
update upg_catalog.pg_appendonly set compresstype = 'quicklz', compresslevel = compresslevel - 10 where compresslevel > 10;
update upg_catalog.pg_appendonly set compresstype = 'zlib' where compresslevel between 1 and 10;
-- upgrade views to account for the new Range Table Entry (RTE) Format.
-- ":forceDistRandom" only ever occurs in RTEs and is the last field
-- NOTE: this effects All views, including user views
update upg_catalog.pg_rewrite set ev_action = regexp_replace(ev_action, ':forceDistRandom (true|false)}', E':forceDistRandom \\1 :pseudocols <>}', 'g'), ev_qual = regexp_replace(ev_qual, ':forceDistRandom (true|false)}', E':forceDistRandom \\1 :pseudocols <>}', 'g');
-- upgrade pg_partitions.parentpartitioname
update upg_catalog.pg_rewrite set ev_action = replace(ev_action, 'parentpartitioname','parentpartitionname') where ev_class = 'upg_catalog.pg_partitions'::regclass;
update upg_catalog.pg_attribute set attname = 'parentpartitionname' where attname = 'parentpartitioname' and attrelid = 'upg_catalog.pg_partitions'::regclass;
-- fixup attislocal
update upg_catalog.pg_attribute set attislocal = 'f' from pg_catalog.pg_partitions where attislocal = 't' and attrelid = (quote_ident(partitionschemaname) || '.' || quote_ident(partitiontablename))::regclass and attnum > 0;
-- Drop the old function "gp_update_ao_master_stats" (oid 7156)
delete from upg_catalog.pg_proc where oid = 7156;
delete from upg_catalog.pg_description where objoid = 7156;
delete from upg_catalog.pg_depend where refobjid = 7156;
-- We no longer track dependencies on table implementation types, toast tables or indices
delete from upg_catalog.pg_shdepend using upg_catalog.pg_class c where classid='pg_type'::regclass and objid = reltype and relkind != 'c';
delete from upg_catalog.pg_shdepend using upg_catalog.pg_class c where classid='pg_class'::regclass and objid = c.oid and relkind in ('t', 'i');
commit;
-- will reindex at the end of loadcat34
此差异已折叠。
-- -*- mode: sql -*-
begin;
-- Prior to persistence tables being functional
set gp_before_persistence_work=true;
-- Updates for shared tables, these updates can only occur in ONE
-- database (template0) otherwise we will end up with duplication
-- issues.
-- Reindex shared tables that were added during upgrade before we load data
reindex table upg_catalog.pg_filespace;
reindex table upg_catalog.pg_resourcetype;
-- Copy in the shared data
copy upg_catalog.pg_filespace from '@gpupgradedatadir@/upg2_pg_filespace_toadd33.data' null as E'\\N' csv delimiter '|' header oids;
copy upg_catalog.pg_shdescription from '@gpupgradedatadir@/upg2_pg_shdescription_toadd33.data' null as E'\\N' csv delimiter '|' header;
copy upg_catalog.pg_resqueue from '@gpupgradedatadir@/upg2_pg_resqueue_toadd33.data' null as E'\\N' csv delimiter '|' header oids;
-- add resourcetype and resqueuecapability here if necessary
copy upg_catalog.pg_resourcetype from '@gpupgradedatadir@/upg2_pg_resourcetype_toadd33.data' null as E'\\N' csv delimiter '|' header oids;
-- Reindex shared tables
reindex table upg_catalog.gp_configuration_history;
reindex table upg_catalog.gp_db_interfaces;
reindex table upg_catalog.gp_fault_strategy;
reindex table upg_catalog.gp_interfaces;
reindex table upg_catalog.gp_san_configuration;
reindex table upg_catalog.gp_segment_configuration;
reindex table upg_catalog.pg_authid;
reindex table upg_catalog.pg_filespace;
reindex table upg_catalog.pg_filespace_entry;
reindex table upg_catalog.pg_resourcetype;
reindex table upg_catalog.pg_resqueue;
reindex table upg_catalog.pg_resqueuecapability;
reindex table upg_catalog.pg_shdescription;
reindex table upg_catalog.pg_stat_last_shoperation;
reindex table upg_catalog.pg_tablespace;
-- Assign users without queues to the default queue
update upg_catalog.pg_authid u set rolresqueue=q.oid from pg_catalog.pg_resqueue q where q.rsqname='pg_default' and u.rolresqueue is null;
-- Assign the system tablespaces to the system filespace
update upg_catalog.pg_tablespace set spcfsoid=3052, spclocation=null, spcprilocations=null, spcmirlocations=null;
-- Update configuration information, while this is executed on every segment
-- it only really applies to the master since that's the only table with any
-- rows in gp_configuration
insert into upg_catalog.gp_segment_configuration(dbid, content, role, preferred_role, mode, status, port, hostname, address, replication_port, san_mounts) (select dbid, content, case when isprimary then 'p' else 'm' end as role, case when definedprimary then 'p' else 'm' end as preferred_role, 's' as mode, 'u' as status, port, hostname, hostname as address, null as replication_port, null as san_mounts from upg_catalog.gp_configuration);
insert into upg_catalog.pg_filespace_entry(fsefsoid, fsedbid, fselocation) (select fs.oid, dbid, datadir from upg_catalog.gp_configuration, upg_catalog.pg_filespace fs where fsname = 'pg_system');
delete from upg_catalog.gp_configuration;
-- Add information for fault strategy
insert into upg_catalog.gp_fault_strategy(fault_strategy) (select case when (select count(*)=0 from upg_catalog.gp_segment_configuration where content >= 0 and preferred_role='m') then 'n' else 'f' end);
-- Add priority=medium for all existing resource queues
insert into upg_catalog.pg_resqueuecapability (select oid, 5, 'medium' from upg_catalog.pg_resqueue);
set gp_before_persistence_work=false;
commit;
-- end
......@@ -10,8 +10,6 @@ restore_restoredb.sql
sreh.sql
upg2.sql
gptokencheck.sql
loadcat33.sql
loadcat34.sql
bkuprestore_advance.sql
bkuprestore_cleanup.sql
caql.sql
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册