提交 0229e1ec 编写于 作者: M Marbin Tan

Remove deprecated and duplicate schedules

Since we only test the higher level "wrappers" for gp_dump, pg_dump. We
can remove those tests. gpmgmt1: gpsys1 is a depercrated functionality.
python mpp8987.py tests unicode for loggers, special characters can deal
with this now, so we can remove it.

Conflicts:
	src/test/regress/bugbuster/expected/bkup_gp.out
	src/test/regress/bugbuster/expected/bkup_pg.out
	src/test/regress/bugbuster/expected/gpmgmt1.out
	src/test/regress/bugbuster/known_good_schedule
	src/test/regress/bugbuster/sql/gpmgmt1.sql

Authors: Marbin Tan & Chris Hajas
上级 993bc9c9
\c tpch_heap
DROP INDEX IF EXISTS idx_ckey;
DROP INDEX IF EXISTS idx_ckey_cname;
DROP INDEX IF EXISTS idx_nation_bitmap;
DROP INDEX IF EXISTS idx_lineitem_keys;
DROP INDEX IF EXISTS idx_linenumber;
DROP TRIGGER IF EXISTS before_heap_ins_trig ON customer;
DROP FUNCTION IF EXISTS trigger_func();
NOTICE: function trigger_func() does not exist, skipping
\echo -- end_ignore
-- end_ignore
-- Create indexes on customer table
CREATE UNIQUE INDEX idx_ckey ON customer USING btree (c_custkey);
CREATE INDEX idx_ckey_cname ON customer USING btree (c_custkey, c_name);
CREATE INDEX idx_nation_bitmap ON customer USING bitmap (c_nationkey);
-- Create indexes on lineitem table
CREATE UNIQUE INDEX idx_lineitem_keys ON lineitem USING btree (l_orderkey, l_partkey, l_suppkey, l_linenumber);
CREATE INDEX idx_linenumber ON lineitem USING btree (l_linenumber);
-- Create function trigger_func() that will be used as the trigger
CREATE FUNCTION trigger_func() RETURNS trigger LANGUAGE plpgsql NO SQL AS '
BEGIN
RAISE NOTICE ''trigger_func() called: action = %, when = %, level = %'', TG_OP, TG_WHEN, TG_LEVEL;
RETURN NULL;
END;';
-- Create trigger before_heap_ins_trig
CREATE TRIGGER before_heap_ins_trig BEFORE INSERT ON customer
FOR EACH ROW EXECUTE PROCEDURE trigger_func();
\c template1
\! gp_dump --version &> /dev/null
\! gp_restore --version &> /dev/null
-- now run back up
\! rm -fr ./cdbfast_gpbkup &> /dev/null
\! mkdir ./cdbfast_gpbkup &> /dev/null
\! gp_dump tpch_heap --gp-d=`pwd`/cdbfast_gpbkup &> /dev/null
-- now restore it
drop database if exists gptest_gprestore;
create database gptest_gprestore;
\! gp_restore --gp-d=`pwd`/cdbfast_gpbkup --gp-k=`find ./cdbfast_gpbkup/gp* -name gp\*[0-9].gz -o -name gp\*[0-9] -exec basename '{}' \; | cut -f 1 -d '.' | cut -f 5 -d '_' | head -1` -d gptest_gprestore &> /dev/null
-- clean up
\! rm -fr ./cdbfast_gpbkup > /dev/null
\c gptest_gprestore
-- Check TPCH all records of all tables are correctly restored
select count(*), sum(n_nationkey), min(n_nationkey), max(n_nationkey) from nation;
count | sum | min | max
-------+-----+-----+-----
25 | 300 | 0 | 24
(1 row)
select count(*), sum(r_regionkey), min(r_regionkey), max(r_regionkey) from region;
count | sum | min | max
-------+-----+-----+-----
5 | 10 | 0 | 4
(1 row)
select count(*), sum(p_partkey), min(p_partkey), max(p_partkey) from part;
count | sum | min | max
-------+---------+-----+------
2000 | 2001000 | 1 | 2000
(1 row)
select count(*), sum(s_suppkey), min(s_suppkey), max(s_suppkey) from supplier;
count | sum | min | max
-------+------+-----+-----
100 | 5050 | 1 | 100
(1 row)
select count(*), sum(ps_partkey + ps_suppkey), min(ps_partkey + ps_suppkey), max(ps_partkey + ps_suppkey) from partsupp;
count | sum | min | max
-------+---------+-----+------
8000 | 8408000 | 3 | 2099
(1 row)
select count(*), sum(c_custkey), min(c_custkey), max(c_custkey) from customer;
count | sum | min | max
-------+---------+-----+------
1500 | 1125750 | 1 | 1500
(1 row)
select count(*), sum(o_orderkey), min(o_orderkey), max(o_orderkey) from orders;
count | sum | min | max
-------+-----------+-----+-------
15000 | 449872500 | 1 | 60000
(1 row)
select count(*), sum(l_linenumber), min(l_linenumber), max(l_linenumber) from lineitem;
count | sum | min | max
-------+--------+-----+-----
60175 | 180782 | 1 | 7
(1 row)
\echo -- start_ignore
-- start_ignore
-- ignore all outputs
--
\c tpch_heap
select version();
version
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 8.2.15 (Greenplum Database main build dev) on i386-apple-darwin10.8.0, compiled by GCC gcc (GCC) 4.4.2 compiled on Aug 1 2012 18:02:47 (with assert checking)
(1 row)
\! pg_dump --version
pg_dump (PostgreSQL) 8.2.15
\! pg_restore --version
pg_restore (Greenplum Database) 8.2.15
\! rm -fr ./cdbfast_pgbkup
\! mkdir ./cdbfast_pgbkup
\! pg_dump -Fc -f `pwd`/cdbfast_pgbkup/pgbkup tpch_heap
drop database if exists gptest_pgrestore;
create database gptest_pgrestore;
\! pg_restore -d gptest_pgrestore `pwd`/cdbfast_pgbkup/pgbkup
\! rm -fr ./cdbfast_pgbkup
\echo -- end_ignore
-- end_ignore
\c gptest_pgrestore
select count(*), sum(n_nationkey), min(n_nationkey), max(n_nationkey) from nation;
count | sum | min | max
-------+-----+-----+-----
25 | 300 | 0 | 24
(1 row)
select count(*), sum(r_regionkey), min(r_regionkey), max(r_regionkey) from region;
count | sum | min | max
-------+-----+-----+-----
5 | 10 | 0 | 4
(1 row)
select count(*), sum(p_partkey), min(p_partkey), max(p_partkey) from part;
count | sum | min | max
-------+---------+-----+------
2000 | 2001000 | 1 | 2000
(1 row)
select count(*), sum(s_suppkey), min(s_suppkey), max(s_suppkey) from supplier;
count | sum | min | max
-------+------+-----+-----
100 | 5050 | 1 | 100
(1 row)
select count(*), sum(ps_partkey + ps_suppkey), min(ps_partkey + ps_suppkey), max(ps_partkey + ps_suppkey) from partsupp;
count | sum | min | max
-------+---------+-----+------
8000 | 8408000 | 3 | 2099
(1 row)
select count(*), sum(c_custkey), min(c_custkey), max(c_custkey) from customer;
count | sum | min | max
-------+---------+-----+------
1500 | 1125750 | 1 | 1500
(1 row)
select count(*), sum(o_orderkey), min(o_orderkey), max(o_orderkey) from orders;
count | sum | min | max
-------+-----------+-----+-------
15000 | 449872500 | 1 | 60000
(1 row)
select count(*), sum(l_linenumber), min(l_linenumber), max(l_linenumber) from lineitem;
count | sum | min | max
-------+--------+-----+-----
60175 | 180782 | 1 | 7
(1 row)
\echo -- start_ignore
-- start_ignore
-- ignore all outputs
--
\! rm -fr ./cdbfast_pgbkup
\! mkdir ./cdbfast_pgbkup
-- Test Options to boost up code coverage for pg_dump
\! pg_dump --format=t -f `pwd`/cdbfast_pgbkup/pg_dumpT tpch_heap
\! pg_dump --format=c -f `pwd`/cdbfast_pgbkup/pg_dumpC.tar tpch_heap
\! pg_dump --format=p -f `pwd`/cdbfast_pgbkup/pg_dumpP tpch_heap
\! pg_dump --format=c --compress=9 -f `pwd`/cdbfast_pgbkup/pg_dumpCZ.tar regression
\! rm -fr ./cdbfast_pgbkup
\! pg_restore --help
pg_restore restores a PostgreSQL database from an archive created by pg_dump.
Usage:
pg_restore [OPTION]... [FILE]
General options:
-d, --dbname=NAME connect to database name
-f, --file=FILENAME output file name
-F, --format=c|t specify backup file format
-i, --ignore-version proceed even when server version mismatches
-l, --list print summarized TOC of the archive
-v, --verbose verbose mode
--help show this help, then exit
--version output version information, then exit
Options controlling the restore:
-a, --data-only restore only the data, no schema
-c, --clean clean (drop) schema prior to create
-C, --create create the target database
-I, --index=NAME restore named index
-L, --use-list=FILENAME use specified table of contents for ordering
output from this file
-n, --schema=NAME restore only objects in this schema
-O, --no-owner skip restoration of object ownership
-P, --function='NAME(args)'
restore named function. name must be exactly
as appears in the TOC, and inside single quotes
-s, --schema-only restore only the schema, no data
-S, --superuser=NAME specify the superuser user name to use for
disabling triggers
-t, --table=NAME restore named table
-T, --trigger=NAME restore named trigger
-x, --no-privileges skip restoration of access privileges (grant/revoke)
--disable-triggers disable triggers during data-only restore
--use-set-session-authorization
use SESSION AUTHORIZATION commands instead of
OWNER TO commands
--no-data-for-failed-tables
do not restore data of tables that could not be
created
-1, --single-transaction
restore as a single transaction
Connection options:
-h, --host=HOSTNAME database server host or socket directory
-p, --port=PORT database server port number
-U, --username=NAME connect as specified database user
-W, --password force password prompt (should happen automatically)
-e, --exit-on-error exit on error, default is to continue
If no input file name is supplied, then standard input is used.
Report bugs to <bugs@greenplum.org>.
\! pg_dump --help
pg_dump dumps a database as a text file or to other formats.
Usage:
pg_dump [OPTION]... [DBNAME]
General options:
-f, --file=FILENAME output file name
-F, --format=c|t|p output file format (custom, tar, plain text)
-i, --ignore-version proceed even when server version mismatches
pg_dump version
-v, --verbose verbose mode
-Z, --compress=0-9 compression level for compressed formats
--help show this help, then exit
--version output version information, then exit
Options controlling the output content:
-a, --data-only dump only the data, not the schema
-b, --blobs include large objects in dump
-c, --clean clean (drop) schema prior to create
-C, --create include commands to create database in dump
-d, --inserts dump data as INSERT, rather than COPY, commands
-D, --column-inserts dump data as INSERT commands with column names
-E, --encoding=ENCODING dump the data in encoding ENCODING
-n, --schema=SCHEMA dump the named schema(s) only
-N, --exclude-schema=SCHEMA do NOT dump the named schema(s)
-o, --oids include OIDs in dump
-O, --no-owner skip restoration of object ownership
in plain text format
-s, --schema-only dump only the schema, no data
-S, --superuser=NAME specify the superuser user name to use in
plain text format
-t, --table=TABLE dump only matching table(s) (or views or sequences)
-T, --exclude-table=TABLE do NOT dump matching table(s) (or views or sequences)
-x, --no-privileges do not dump privileges (grant/revoke)
--disable-dollar-quoting disable dollar quoting, use SQL standard quoting
--disable-triggers disable triggers during data-only restore
--use-set-session-authorization
use SESSION AUTHORIZATION commands instead of
ALTER OWNER commands to set ownership
--gp-syntax dump with Greenplum Database syntax (default if gpdb)
--no-gp-syntax dump without Greenplum Database syntax (default if postgresql)
Connection options:
-h, --host=HOSTNAME database server host or socket directory
-p, --port=PORT database server port number
-U, --username=NAME connect as specified database user
-W, --password force password prompt (should happen automatically)
If no database name is supplied, then the PGDATABASE environment
variable value is used.
Report bugs to <bugs@greenplum.org>.
\echo -- end_ignore
-- end_ignore
\! gpsys1 &> /dev/null
\! gpsys1 -a &> /dev/null
\! gpsys1 -p &> /dev/null
\! gpsys1 -m &> /dev/null
\! gpsys1 -pm &> /dev/null
\! gpsys1 -am &> /dev/null
\! python mpp8987.py &> /dev/null
\! gpcheckperf -h localhost -d /tmp -r d -S 10kb &> /dev/null
\! gpcheckperf -h localhost -d /tmp/ -r s &> /dev/null
\! gpstate -v &> /dev/null
\! gpstate -b &> /dev/null
\! gpstate -e &> /dev/null
......@@ -11,7 +11,6 @@ test: security
test: load_tpch sirv_functions view xpath
# these tests depend on load_tpch
test: tpch_query tpch_aopart hashagg gpsort
test: bkup_gp
test: mpp-11333
test: codecoverage
test: gist_indexes
......@@ -21,7 +20,7 @@ test: gp_persistent_table
#mpp23872: Disabling gpcheckmirrorseg as it is erroring out bugbuster on some platforms.
ignore: gpcheckmirrorseg
test: AOCO_Compression2 schema_topology table_statistics
test: bkup_pg gpmgmt1 cursor metadata_track
test: cursor metadata_track
test: memory_quota
test: TestPSQL
test: opperf
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from gppylib.gplog import *
logger = setup_tool_logging('example', 'localhost', 'user')
logger.info("퀙퀠퀩퀘ㄲㄸㅉㅃ12ㅁavb")
\c tpch_heap
DROP INDEX IF EXISTS idx_ckey;
DROP INDEX IF EXISTS idx_ckey_cname;
DROP INDEX IF EXISTS idx_nation_bitmap;
DROP INDEX IF EXISTS idx_lineitem_keys;
DROP INDEX IF EXISTS idx_linenumber;
DROP TRIGGER IF EXISTS before_heap_ins_trig ON customer;
DROP FUNCTION IF EXISTS trigger_func();
\echo -- end_ignore
-- Create indexes on customer table
CREATE UNIQUE INDEX idx_ckey ON customer USING btree (c_custkey);
CREATE INDEX idx_ckey_cname ON customer USING btree (c_custkey, c_name);
CREATE INDEX idx_nation_bitmap ON customer USING bitmap (c_nationkey);
-- Create indexes on lineitem table
CREATE UNIQUE INDEX idx_lineitem_keys ON lineitem USING btree (l_orderkey, l_partkey, l_suppkey, l_linenumber);
CREATE INDEX idx_linenumber ON lineitem USING btree (l_linenumber);
-- Create function trigger_func() that will be used as the trigger
CREATE FUNCTION trigger_func() RETURNS trigger LANGUAGE plpgsql NO SQL AS '
BEGIN
RAISE NOTICE ''trigger_func() called: action = %, when = %, level = %'', TG_OP, TG_WHEN, TG_LEVEL;
RETURN NULL;
END;';
-- Create trigger before_heap_ins_trig
CREATE TRIGGER before_heap_ins_trig BEFORE INSERT ON customer
FOR EACH ROW EXECUTE PROCEDURE trigger_func();
\c template1
\! gp_dump --version &> /dev/null
\! gp_restore --version &> /dev/null
-- now run back up
\! rm -fr ./cdbfast_gpbkup &> /dev/null
\! mkdir ./cdbfast_gpbkup &> /dev/null
\! gp_dump tpch_heap --gp-d=`pwd`/cdbfast_gpbkup &> /dev/null
-- now restore it
drop database if exists gptest_gprestore;
create database gptest_gprestore;
\! gp_restore --gp-d=`pwd`/cdbfast_gpbkup --gp-k=`find ./cdbfast_gpbkup/gp* -name gp\*[0-9].gz -o -name gp\*[0-9] -exec basename '{}' \; | cut -f 1 -d '.' | cut -f 5 -d '_' | head -1` -d gptest_gprestore &> /dev/null
-- clean up
\! rm -fr ./cdbfast_gpbkup > /dev/null
\c gptest_gprestore
-- Check TPCH all records of all tables are correctly restored
select count(*), sum(n_nationkey), min(n_nationkey), max(n_nationkey) from nation;
select count(*), sum(r_regionkey), min(r_regionkey), max(r_regionkey) from region;
select count(*), sum(p_partkey), min(p_partkey), max(p_partkey) from part;
select count(*), sum(s_suppkey), min(s_suppkey), max(s_suppkey) from supplier;
select count(*), sum(ps_partkey + ps_suppkey), min(ps_partkey + ps_suppkey), max(ps_partkey + ps_suppkey) from partsupp;
select count(*), sum(c_custkey), min(c_custkey), max(c_custkey) from customer;
select count(*), sum(o_orderkey), min(o_orderkey), max(o_orderkey) from orders;
select count(*), sum(l_linenumber), min(l_linenumber), max(l_linenumber) from lineitem;
\echo -- start_ignore
-- ignore all outputs
--
\c tpch_heap
select version();
\! pg_dump --version
\! pg_restore --version
\! rm -fr ./cdbfast_pgbkup
\! mkdir ./cdbfast_pgbkup
\! pg_dump -Fc -f `pwd`/cdbfast_pgbkup/pgbkup tpch_heap
drop database if exists gptest_pgrestore;
create database gptest_pgrestore;
\! pg_restore -d gptest_pgrestore `pwd`/cdbfast_pgbkup/pgbkup
\! rm -fr ./cdbfast_pgbkup
\echo -- end_ignore
\c gptest_pgrestore
select count(*), sum(n_nationkey), min(n_nationkey), max(n_nationkey) from nation;
select count(*), sum(r_regionkey), min(r_regionkey), max(r_regionkey) from region;
select count(*), sum(p_partkey), min(p_partkey), max(p_partkey) from part;
select count(*), sum(s_suppkey), min(s_suppkey), max(s_suppkey) from supplier;
select count(*), sum(ps_partkey + ps_suppkey), min(ps_partkey + ps_suppkey), max(ps_partkey + ps_suppkey) from partsupp;
select count(*), sum(c_custkey), min(c_custkey), max(c_custkey) from customer;
select count(*), sum(o_orderkey), min(o_orderkey), max(o_orderkey) from orders;
select count(*), sum(l_linenumber), min(l_linenumber), max(l_linenumber) from lineitem;
\echo -- start_ignore
-- ignore all outputs
--
\! rm -fr ./cdbfast_pgbkup
\! mkdir ./cdbfast_pgbkup
-- Test Options to boost up code coverage for pg_dump
\! pg_dump --format=t -f `pwd`/cdbfast_pgbkup/pg_dumpT tpch_heap
\! pg_dump --format=c -f `pwd`/cdbfast_pgbkup/pg_dumpC.tar tpch_heap
\! pg_dump --format=p -f `pwd`/cdbfast_pgbkup/pg_dumpP tpch_heap
\! pg_dump --format=c --compress=9 -f `pwd`/cdbfast_pgbkup/pg_dumpCZ.tar regression
\! rm -fr ./cdbfast_pgbkup
\! pg_restore --help
\! pg_dump --help
\echo -- end_ignore
\! gpsys1 &> /dev/null
\! gpsys1 -a &> /dev/null
\! gpsys1 -p &> /dev/null
\! gpsys1 -m &> /dev/null
\! gpsys1 -pm &> /dev/null
\! gpsys1 -am &> /dev/null
\! python mpp8987.py &> /dev/null
\! gpcheckperf -h localhost -d /tmp -r d -S 10kb &> /dev/null
\! gpcheckperf -h localhost -d /tmp/ -r s &> /dev/null
\! gpstate -v &> /dev/null
\! gpstate -b &> /dev/null
\! gpstate -e &> /dev/null
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册