Merge pull request #1242 from citusdata/debug4_to_debug2

Use DEBUG2 instead of DEBUG4 in INSERT SELECT tests & debug message
pull/1247/head
Metin Döşlü 2017-02-20 13:29:31 +02:00 committed by GitHub
commit b8e4763a1a
3 changed files with 27 additions and 442 deletions

View File

@ -474,7 +474,7 @@ RouterModifyTaskForShardInterval(Query *originalQuery, ShardInterval *shardInter
/* and generate the full query string */ /* and generate the full query string */
deparse_shard_query(copiedQuery, distributedTableId, shardInterval->shardId, deparse_shard_query(copiedQuery, distributedTableId, shardInterval->shardId,
queryString); queryString);
ereport(DEBUG4, (errmsg("distributed statement: %s", queryString->data))); ereport(DEBUG2, (errmsg("distributed statement: %s", queryString->data)));
modifyTask = CreateBasicTask(jobId, taskIdIndex, MODIFY_TASK, queryString->data); modifyTask = CreateBasicTask(jobId, taskIdIndex, MODIFY_TASK, queryString->data);
modifyTask->dependedTaskList = NULL; modifyTask->dependedTaskList = NULL;

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,7 @@ INSERT INTO raw_events_first (user_id, time, value_1, value_2, value_3, value_4)
INSERT INTO raw_events_first (user_id, time, value_1, value_2, value_3, value_4) VALUES INSERT INTO raw_events_first (user_id, time, value_1, value_2, value_3, value_4) VALUES
(6, now(), 60, 600, 6000.1, 60000); (6, now(), 60, 600, 6000.1, 60000);
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
-- raw table to raw table -- raw table to raw table
INSERT INTO raw_events_second SELECT * FROM raw_events_first; INSERT INTO raw_events_second SELECT * FROM raw_events_first;
@ -144,7 +144,7 @@ INSERT INTO raw_events_first (user_id, time) VALUES
(7, now()); (7, now());
-- try a single shard query -- try a single shard query
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
INSERT INTO raw_events_second (user_id, time) SELECT user_id, time FROM raw_events_first WHERE user_id = 7; INSERT INTO raw_events_second (user_id, time) SELECT user_id, time FROM raw_events_first WHERE user_id = 7;
@ -156,7 +156,7 @@ INSERT INTO raw_events_first (user_id, time, value_1, value_2, value_3, value_4)
-- reorder columns -- reorder columns
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
INSERT INTO raw_events_second (value_2, value_1, value_3, value_4, user_id, time) INSERT INTO raw_events_second (value_2, value_1, value_3, value_4, user_id, time)
SELECT SELECT
value_2, value_1, value_3, value_4, user_id, time value_2, value_1, value_3, value_4, user_id, time
@ -191,7 +191,7 @@ INSERT INTO raw_events_first (user_id, time, value_1, value_2, value_3, value_4)
-- show that RETURNING also works -- show that RETURNING also works
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
INSERT INTO raw_events_second (user_id, value_1, value_3) INSERT INTO raw_events_second (user_id, value_1, value_3)
SELECT SELECT
user_id, value_1, value_3 user_id, value_1, value_3
@ -411,7 +411,7 @@ SELECT t1.user_id AS col1,
ORDER BY t1.user_id, ORDER BY t1.user_id,
t2.user_id; t2.user_id;
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
-- we insert 10 rows since we filtered out -- we insert 10 rows since we filtered out
-- NULL partition column values -- NULL partition column values
INSERT INTO agg_events (user_id, value_1_agg) INSERT INTO agg_events (user_id, value_1_agg)
@ -433,7 +433,7 @@ ORDER BY
-- we don't want to see constraint vialotions, so truncate first -- we don't want to see constraint vialotions, so truncate first
SET client_min_messages TO INFO; SET client_min_messages TO INFO;
TRUNCATE agg_events; TRUNCATE agg_events;
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
-- DISTINCT clause -- DISTINCT clause
INSERT INTO agg_events (value_1_agg, user_id) INSERT INTO agg_events (value_1_agg, user_id)
@ -445,7 +445,7 @@ INSERT INTO agg_events (value_1_agg, user_id)
-- we don't want to see constraint vialotions, so truncate first -- we don't want to see constraint vialotions, so truncate first
SET client_min_messages TO INFO; SET client_min_messages TO INFO;
truncate agg_events; truncate agg_events;
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
-- we do not support DISTINCT ON clauses -- we do not support DISTINCT ON clauses
INSERT INTO agg_events (value_1_agg, user_id) INSERT INTO agg_events (value_1_agg, user_id)
@ -757,14 +757,14 @@ INSERT INTO test_view SELECT * FROM raw_events_second;
-- we need this in our next test -- we need this in our next test
truncate raw_events_first; truncate raw_events_first;
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
-- first show that the query works now -- first show that the query works now
INSERT INTO raw_events_first SELECT * FROM raw_events_second; INSERT INTO raw_events_first SELECT * FROM raw_events_second;
SET client_min_messages TO INFO; SET client_min_messages TO INFO;
truncate raw_events_first; truncate raw_events_first;
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
-- now show that it works for a single shard query as well -- now show that it works for a single shard query as well
INSERT INTO raw_events_first SELECT * FROM raw_events_second WHERE user_id = 5; INSERT INTO raw_events_first SELECT * FROM raw_events_second WHERE user_id = 5;
@ -774,7 +774,7 @@ SET client_min_messages TO INFO;
-- if a single shard of the SELECT is unhealty, the query should fail -- if a single shard of the SELECT is unhealty, the query should fail
UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid = 13300004 AND nodeport = :worker_1_port; UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid = 13300004 AND nodeport = :worker_1_port;
truncate raw_events_first; truncate raw_events_first;
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
-- this should fail -- this should fail
INSERT INTO raw_events_first SELECT * FROM raw_events_second; INSERT INTO raw_events_first SELECT * FROM raw_events_second;
@ -793,14 +793,14 @@ UPDATE pg_dist_shard_placement SET shardstate = 1 WHERE shardid = 13300004 AND n
-- now that we should show that it works if one of the target shard interval is not healthy -- now that we should show that it works if one of the target shard interval is not healthy
UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid = 13300000 AND nodeport = :worker_1_port; UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid = 13300000 AND nodeport = :worker_1_port;
truncate raw_events_first; truncate raw_events_first;
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
-- this should work -- this should work
INSERT INTO raw_events_first SELECT * FROM raw_events_second; INSERT INTO raw_events_first SELECT * FROM raw_events_second;
SET client_min_messages TO INFO; SET client_min_messages TO INFO;
truncate raw_events_first; truncate raw_events_first;
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
-- this should also work -- this should also work
INSERT INTO raw_events_first SELECT * FROM raw_events_second WHERE user_id = 5; INSERT INTO raw_events_first SELECT * FROM raw_events_second WHERE user_id = 5;
@ -824,7 +824,7 @@ SET citus.shard_count = 2;
SELECT create_distributed_table('table_with_defaults', 'store_id'); SELECT create_distributed_table('table_with_defaults', 'store_id');
-- let's see the queries -- let's see the queries
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG2;
-- a very simple query -- a very simple query
INSERT INTO table_with_defaults SELECT * FROM table_with_defaults; INSERT INTO table_with_defaults SELECT * FROM table_with_defaults;