提交 1e199700 编写于 作者: J Jimmy Yih

Fix walrep TINC tests

Some walrep TINC tests have been broken for a while now due to all the
changes going into 5.0_MASTER. This commit brings the tests back to a
green state so that we can add these tests back to our validation
pipeline. Most changes are simple like fixing pg_ctl calls to use long
options, updating xlogdump parsing, or just updating ans files.
上级 5b9635c9
......@@ -166,7 +166,7 @@ class WalReplKillProcessTestCase(TINCTestCase):
activate_stdby = GpactivateStandby()
stdby_mdd = activate_stdby.get_standby_dd()
stdby_port = activate_stdby.get_standby_port()
cmd="pg_ctl -D %s -o '-p %s -b %s -z 2 --silent-mode=true -i -M master -C -1 -x 0 -E' start &"%(stdby_mdd, stdby_port, stdby_dbid)
cmd="pg_ctl -D %s -o '-p %s --gp_dbid=%s --gp_num_contents_in_cluster=2 --silent-mode=true -i -M master --gp_contentid=-1 -x 0 -E' start &"%(stdby_mdd, stdby_port, stdby_dbid)
self.run_remote(stdby_host,cmd,stdby_port,stdby_mdd)
......
......@@ -50,26 +50,27 @@ select * from ggg;
(10 rows)
select * from ggg_1_prt_1;
a | b | d | e
---+---+---+------------
2 | 2 | 4 | 2001-01-15
2 | 7 | 3 | 2001-01-15
1 | 1 | 1 | 2001-01-15
1 | 3 | 1 | 2001-01-15
(4 rows)
select * from ggg_1_prt_2;
a | b | d | e
a | b | d | e
---+---+----+------------
2 | 7 | 3 | 2001-01-15
2 | c | 44 | 2001-01-15
1 | 4 | 5 | 2001-01-15
1 | 5 | 6 | 2001-01-15
1 | a | 33 | 2001-01-15
2 | 2 | 3 | 2001-01-15
(4 rows)
select * from ggg_1_prt_2;
a | b | d | e
---+---+---+------------
2 | 2 | 1 | 2001-01-15
2 | 2 | 4 | 2001-01-15
1 | 1 | 1 | 2001-01-15
(3 rows)
select * from ggg_1_prt_3;
a | b | d | e
---+---+----+------------
2 | 2 | 1 | 2001-01-15
2 | c | 44 | 2001-01-15
(2 rows)
a | b | d | e
---+---+---+------------
1 | 3 | 1 | 2001-01-15
1 | 5 | 6 | 2001-01-15
2 | 2 | 3 | 2001-01-15
(3 rows)
......@@ -8,11 +8,10 @@ AS
$$
DECLARE
BEGIN
EXECUTE 'INSERT INTO subt_plpgsql_t1(a) VALUES (%)' , i;
EXECUTE 'INSERT INTO subt_plpgsql_t1(a) VALUES (' || inp || ');';
EXCEPTION
WHEN others THEN
RAISE NOTICE 'Error in data';
END;
$$
LANGUAGE PLPGSQL
......@@ -47,326 +46,11 @@ psql:/path/sql_file:1: NOTICE: table "subt_plpgsql_t1" does not exist, skipping
DROP TABLE
-- end_ignore
create table subt_plpgsql_t1( a char);
create table subt_plpgsql_t1(a int);
psql:/path/sql_file:1: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE
select subt_inData(1,105);
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
psql:/path/sql_file:1: NOTICE: Error in data
CONTEXT: SQL statement "SELECT subt_insertValue(100)"
PL/pgSQL function "subt_indata" line 6 at perform
subt_indata
-------------
......@@ -375,5 +59,5 @@ PL/pgSQL function "subt_indata" line 6 at perform
select count(*) from subt_plpgsql_t1;
count
-------
0
105
(1 row)
......@@ -30,8 +30,8 @@ CREATE TABLE
col015 | bytea | | extended |
col016 | timestamp with time zone | | plain |
col017 | interval | | plain |
col018 | cidr | | plain |
col019 | inet | | plain |
col018 | cidr | | main |
col019 | inet | | main |
col020 | macaddr | | plain |
col022 | money | | plain |
col025 | circle | | plain |
......@@ -92,8 +92,8 @@ CREATE TABLE
col015 | bytea | | extended |
col016 | timestamp with time zone | | plain |
col017 | interval | | plain |
col018 | cidr | | plain |
col019 | inet | | plain |
col018 | cidr | | main |
col019 | inet | | main |
col020 | macaddr | | plain |
col022 | money | | plain |
col025 | circle | | plain |
......
......@@ -33,8 +33,8 @@ CREATE TABLE
col015 | bytea | | extended | none | 0 | 32768 |
col016 | timestamp with time zone | | plain | none | 0 | 32768 |
col017 | interval | | plain | none | 0 | 32768 |
col018 | cidr | | plain | none | 0 | 32768 |
col019 | inet | | plain | none | 0 | 32768 |
col018 | cidr | | main | none | 0 | 32768 |
col019 | inet | | main | none | 0 | 32768 |
col020 | macaddr | | plain | none | 0 | 32768 |
col022 | money | | plain | none | 0 | 32768 |
col024 | time with time zone | | plain | none | 0 | 32768 |
......@@ -92,8 +92,8 @@ CREATE TABLE
col015 | bytea | | extended | none | 0 | 32768 |
col016 | timestamp with time zone | | plain | none | 0 | 32768 |
col017 | interval | | plain | none | 0 | 32768 |
col018 | cidr | | plain | none | 0 | 32768 |
col019 | inet | | plain | none | 0 | 32768 |
col018 | cidr | | main | none | 0 | 32768 |
col019 | inet | | main | none | 0 | 32768 |
col020 | macaddr | | plain | none | 0 | 32768 |
col022 | money | | plain | none | 0 | 32768 |
col024 | time with time zone | | plain | none | 0 | 32768 |
......
......@@ -200,7 +200,7 @@ select * from A where A.j = any (select C.j from C,B where C.j = A.j and B.i = a
(4 rows)
select * from A,B where A.j = any (select C.j from C where C.j = A.j and B.i = any (select C.i from C where C.i != 10 and C.i = A.i)) order by 1,2,3,4; -- Not supported, should fail
psql:/path/sql_file:1: ERROR: correlated subquery with skip-level correlations is not supported (subselect.c:394)
psql:/path/sql_file:1: ERROR: correlated subquery with skip-level correlations is not supported
select A.i, B.i, C.j from A, B, C where A.j = (select C.j from C where C.j = A.j and C.i = any (select B.i from B where C.i = B.i and B.i !=10)) order by A.i, B.i, C.j limit 10;
i | i | j
----+----+-----
......
......@@ -9,11 +9,10 @@ AS
$$
DECLARE
BEGIN
EXECUTE 'INSERT INTO subt_plpgsql_t1(a) VALUES (%)' , i;
EXECUTE 'INSERT INTO subt_plpgsql_t1(a) VALUES (' || inp || ');';
EXCEPTION
WHEN others THEN
RAISE NOTICE 'Error in data';
END;
$$
LANGUAGE PLPGSQL
......@@ -41,6 +40,6 @@ LANGUAGE PLPGSQL
-- start_ignore
drop table if exists subt_plpgsql_t1;
-- end_ignore
create table subt_plpgsql_t1( a char);
create table subt_plpgsql_t1(a int);
select subt_inData(1,105);
select count(*) from subt_plpgsql_t1;
......@@ -55,7 +55,7 @@ class OODClass(MPPTestCase):
def restart_standby(self):
sdby_host = self.config.get_master_standbyhost()
stdby_dbid = self.get_standby_dbid()
cmd="pg_ctl -D %s -o '-p %s -b %s -z 2 --silent-mode=true -i -M master -C -1 -x 0 -E' start &"%(self.sdby_mdd, self.pgport,stdby_dbid)
cmd="pg_ctl -D %s -o '-p %s --gp_dbid=%s --gp_num_contents_in_cluster=2 --silent-mode=true -i -M master --gp_contentid=-1 -x 0 -E' start &"%(self.sdby_mdd, self.pgport, stdby_dbid)
self.assertTrue(self.gp.run_remote(sdby_host,cmd, self.pgport, self.sdby_mdd))
self.assertTrue(self.verify.check_standby_processes())
......
......@@ -2,9 +2,12 @@ PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
override CC:=gcc
override CFLAGS:=-m64
NAME = oom_malloc
all:
$(CC) $(CFLAGS) $(SHLIB_LINK) -shared -fPIC -o $(NAME)$(DLSUFFIX) $(NAME).c
$(CC) $(CFLAGS) -shared -fPIC -o $(NAME)$(DLSUFFIX) $(NAME).c
clean:
rm -f $(NAME)$(DLSUFFIX)
......@@ -4,6 +4,7 @@
CREATE TABLE statrepl(a int, b bigint, c text)
PARTITION BY RANGE(b) (
START (1) END (10) EVERY (1));
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
NOTICE: CREATE TABLE will create partition "statrepl_1_prt_1" for table "statrepl"
NOTICE: CREATE TABLE will create partition "statrepl_1_prt_2" for table "statrepl"
NOTICE: CREATE TABLE will create partition "statrepl_1_prt_3" for table "statrepl"
......@@ -13,6 +14,7 @@ NOTICE: CREATE TABLE will create partition "statrepl_1_prt_6" for table "statre
NOTICE: CREATE TABLE will create partition "statrepl_1_prt_7" for table "statrepl"
NOTICE: CREATE TABLE will create partition "statrepl_1_prt_8" for table "statrepl"
NOTICE: CREATE TABLE will create partition "statrepl_1_prt_9" for table "statrepl"
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
CREATE TABLE
-- each location should not go beyond the previous one,
-- and a record should present while a standby is running.
......
......@@ -164,8 +164,8 @@ class smart_shutdown(MPPTestCase):
flag = False
for line in range(0, len(lines) - 1):
if ((lines[line]).find(primary_last_ckpt_lsn) > -1):
self.assertTrue((lines[line + 1]).find("checkpoint") > -1)
self.assertTrue((lines[line + 2]).find("shutdown") > -1)
self.assertTrue((lines[line]).find("checkpoint") > -1)
self.assertTrue((lines[line]).find("shutdown") > -1)
flag = True
break
......
#!/usr/bin/env python
"""
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from gppylib.commands.base import Command
from tinctest import logger
from mpp.lib.PSQL import PSQL
from mpp.models import MPPTestCase
from mpp.gpdb.tests.storage.walrepl import lib as walrepl
import mpp.gpdb.tests.storage.walrepl.run
from mpp.gpdb.tests.storage.walrepl.lib.fault import *
import os
import re
import subprocess
import socket
import time
import shutil
import sys
import signal
class xlog(mpp.gpdb.tests.storage.walrepl.run.StandbyRunMixin, MPPTestCase):
def tearDown(self):
Gpfault().reset_fault('transaction_abort_after_distributed_prepared')
def check_pg_stat_activity(self, query):
"""
Check if the transaction has been started for pg_stat_activity
"""
logger.info('checking for query in pg_stat_activity')
MAX_TRIES = 300
tries = 0
while tries < MAX_TRIES:
output = PSQL.run_sql_command('SELECT * FROM pg_stat_activity')
if query in output:
logger.info('found query in pg_stat_activity')
return True
tries += 1
return False
def test_xlogPreparedXactSeg(self):
"""
Test to verify the xlog on segment gets cleaned-up only till point of oldest prepared transaction.
The flow of this test is as follows.
1. Initiate the Standby using the Master (primary) postmaster
paramerters.
2. A: Inject the fault to suspend Mater after Prepare done.
3. A: Now execute a transaction and commit it. This transaction will be blocked.
4. B: Inject the fault to suspend Mater after Commit done.
5. B: Now execute a transaction and commit it. This master will be blocked.
6. Promote the standby.
7. Verify the result, transaction A results should not be visible and
transaction B results should be visible.
"""
PSQL.run_sql_command('DROP table if exists xansrep_prepare')
PSQL.run_sql_command('DROP table if exists xansrep1, xansrep2, xansrep3, xansrep4')
fault = Gpfault()
# 2. Inject fault at prepared state
result = fault.suspend_at(
'transaction_abort_after_distributed_prepared')
logger.info(result.stdout)
self.assertEqual(result.rc, 0, result.stdout)
# 3. Now execute a transaction and commit it. The backend is expected
# be blocked.
logger.info('Create table xansrep_prepare...')
create_xansprep_prepare_query = 'create table xansprep_prepare (a int)'
# Due to the suspend, we don't wait for the result
subprocess.Popen(['psql',
'-c', create_xansprep_prepare_query,
'-p', os.environ.get('PGPORT')],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
logger.info('Check if suspend fault is hit ...')
if not self.check_pg_stat_activity(create_xansprep_prepare_query):
logger.error('transaction has not been started yet')
triggered = fault.wait_triggered(
'transaction_abort_after_distributed_prepared')
self.assertTrue(triggered, 'Fault was not triggered')
# Lets trigger switch to xlog on segment
PSQL.run_sql_command_utility_mode(sql_cmd='select pg_switch_xlog()', port=2100)
PSQL.run_sql_command_utility_mode(sql_cmd='checkpoint', port=2100)
# Generate more records on xlog
PSQL.run_sql_command('create table xansrep1 (a int)')
PSQL.run_sql_command('create table xansrep2 (a int)')
PSQL.run_sql_command_utility_mode(sql_cmd='select pg_switch_xlog()', port=2100)
PSQL.run_sql_command_utility_mode(sql_cmd='checkpoint', port=2100)
PSQL.run_sql_command('create table xansrep3 (a int)')
PSQL.run_sql_command('create table xansrep4 (a int)')
PSQL.run_sql_command_utility_mode(sql_cmd='select pg_switch_xlog()', port=2100)
PSQL.run_sql_command_utility_mode(sql_cmd='checkpoint', port=2100)
cmd = Command('gpstop', 'gpstop -air')
cmd.run(validateAfter=True)
......@@ -149,9 +149,6 @@ class GpdbVerify:
fix_outfile = self.LOGPATH + "/fixfile_" + cur_time
if options is None:
if master:
version = PSQL.run_sql_command('select version();', flags = '-q -t', dbname= 'postgres')
if '4.3' not in version :
PSQL.run_sql_command("CHECKPOINT; CHECKPOINT; CHECKPOINT; CHECKPOINT; select pg_sleep(60);")
options = " -mastermirror=true -exclude recovery.conf -ignore 'gp_restore' -ignore 'gp_cdatabase' -ignore 'gp_dump' -ignore '_data' -ignore 'wet_execute.tbl' -ignore 'pg_xlog' -ignore 'pg_changetracking' -ignore 'pg_verify' -ignore 'backup_label.old' -dirignore 'pg_xlog' -ignore 'pg_subtrans' -dirignore 'gpperfmon/data' "
else:
options = " -ignore '_data' -ignore 'wet_execute.tbl' -ignore 'gp_dump' -ignore 'core' -ignore pg_changetracking -ignore 'pg_xlog' -ignore 'pg_verify' -parallel=true"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册