Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn debug messages into DEBUG1 #2443

Merged
merged 1 commit into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion test/expected/chunk_utils_compression.out
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ SELECT create_hypertable('public.table_to_compress', 'time', chunk_time_interval
(1 row)

ALTER TABLE public.table_to_compress SET (timescaledb.compress, timescaledb.compress_segmentby = 'acq_id');
NOTICE: adding index _compressed_hypertable_3_acq_id__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_3 USING BTREE(acq_id, _ts_meta_sequence_num)
INSERT INTO public.table_to_compress VALUES ('2020-01-01', 1234567, 777888);
INSERT INTO public.table_to_compress VALUES ('2020-02-01', 567567, 890890);
INSERT INTO public.table_to_compress VALUES ('2020-02-10', 1234, 5678);
Expand Down
2 changes: 1 addition & 1 deletion tsl/src/compression/create.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ create_compressed_table_indexes(Oid compresstable_relid, CompressColInfo *compre
if (!HeapTupleIsValid(index_tuple))
elog(ERROR, "cache lookup failed for index relid %d", index_addr.objectId);
index_name = ((Form_pg_class) GETSTRUCT(index_tuple))->relname;
elog(NOTICE,
elog(DEBUG1,
"adding index %s ON %s.%s USING BTREE(%s, %s)",
NameStr(index_name),
NameStr(ht->fd.schema_name),
Expand Down
2 changes: 1 addition & 1 deletion tsl/src/continuous_aggs/create.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ mattablecolumninfo_add_mattable_index(MatTableColumnInfo *matcolinfo, Hypertable
if (!HeapTupleIsValid(indxtuple))
elog(ERROR, "cache lookup failed for index relid %d", indxaddr.objectId);
indxname = ((Form_pg_class) GETSTRUCT(indxtuple))->relname;
elog(NOTICE,
elog(DEBUG1,
"adding index %s ON %s.%s USING BTREE(%s, %s)",
NameStr(indxname),
NameStr(ht->fd.schema_name),
Expand Down
14 changes: 0 additions & 14 deletions tsl/test/expected/compression.out
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ insert into foo values( 10 , 10 , 20, NULL);
insert into foo values( 20 , 11 , 20, NULL);
insert into foo values( 30 , 12 , 20, NULL);
alter table foo set (timescaledb.compress, timescaledb.compress_segmentby = 'a,b', timescaledb.compress_orderby = 'c desc, d asc nulls last');
NOTICE: adding index _compressed_hypertable_2_a__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_2 USING BTREE(a, _ts_meta_sequence_num)
NOTICE: adding index _compressed_hypertable_2_b__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_2 USING BTREE(b, _ts_meta_sequence_num)
--test self-refencing updates
SET timescaledb.enable_transparent_decompression to ON;
update foo set c = 40
Expand Down Expand Up @@ -257,7 +255,6 @@ select create_hypertable( 'conditions', 'time', chunk_time_interval=> '31days'::
(1 row)

alter table conditions set (timescaledb.compress, timescaledb.compress_segmentby = 'location', timescaledb.compress_orderby = 'time');
NOTICE: adding index _compressed_hypertable_6_location__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_6 USING BTREE(location, _ts_meta_sequence_num)
insert into conditions
select generate_series('2018-12-01 00:00'::timestamp, '2018-12-31 00:00'::timestamp, '1 day'), 'POR', 'klick', 55, 75;
insert into conditions
Expand Down Expand Up @@ -602,8 +599,6 @@ alter table test_collation set (timescaledb.compress, timescaledb.compress_segme
ERROR: unable to parse timescaledb.compress_orderby option 'val_1 COLLATE "POSIX", val2, time'
\set ON_ERROR_STOP 1
alter table test_collation set (timescaledb.compress, timescaledb.compress_segmentby='device_id, device_id_2', timescaledb.compress_orderby = 'val_1, val_2, time');
NOTICE: adding index _compressed_hypertable_10_device_id__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_10 USING BTREE(device_id, _ts_meta_sequence_num)
NOTICE: adding index _compressed_hypertable_10_device_id_2__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_10 USING BTREE(device_id_2, _ts_meta_sequence_num)
insert into test_collation
select generate_series('2018-01-01 00:00'::timestamp, '2018-01-10 00:00'::timestamp, '2 hour'), 'device_1', 'device_3', gen_rand_minstd(), gen_rand_minstd();
insert into test_collation
Expand Down Expand Up @@ -944,10 +939,6 @@ SELECT
avg(v1+v2) AS avg2
FROM metrics
GROUP BY 1 WITH NO DATA;
NOTICE: adding index _materialized_hypertable_14_const_time_idx ON _timescaledb_internal._materialized_hypertable_14 USING BTREE(const, time)
NOTICE: adding index _materialized_hypertable_14_numeric_time_idx ON _timescaledb_internal._materialized_hypertable_14 USING BTREE(numeric, time)
NOTICE: adding index _materialized_hypertable_14_case_time_idx ON _timescaledb_internal._materialized_hypertable_14 USING BTREE(case, time)
NOTICE: adding index _materialized_hypertable_14_coalesce_time_idx ON _timescaledb_internal._materialized_hypertable_14 USING BTREE(coalesce, time)
CALL refresh_continuous_aggregate('cagg_expr', NULL, NULL);
SELECT * FROM cagg_expr ORDER BY time LIMIT 5;
time | const | numeric | first | case | coalesce | avg1 | avg2
Expand All @@ -970,7 +961,6 @@ SELECT create_hypertable('rescan_test', 't', chunk_time_interval => interval '1

-- compression
ALTER TABLE rescan_test SET (timescaledb.compress, timescaledb.compress_segmentby = 'id');
NOTICE: adding index _compressed_hypertable_17_id__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_17 USING BTREE(id, _ts_meta_sequence_num)
-- INSERT dummy data
INSERT INTO rescan_test SELECT 1, time, random() FROM generate_series('2000-01-01'::timestamptz, '2000-01-05'::timestamptz, '1h'::interval) g(time);
SELECT count(*) FROM rescan_test;
Expand Down Expand Up @@ -1031,7 +1021,6 @@ ALTER TABLE hyper SET (
timescaledb.compress,
timescaledb.compress_orderby = 'time',
timescaledb.compress_segmentby = 'device_id');
NOTICE: adding index _compressed_hypertable_19_device_id__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_19 USING BTREE(device_id, _ts_meta_sequence_num)
INSERT INTO meta VALUES (1), (2), (3), (4), (5);
INSERT INTO hyper VALUES (1, 1, 1), (2, 2, 1), (3, 3, 1), (10, 3, 2), (11, 4, 2), (11, 5, 2);
SELECT ch1.table_name AS "CHUNK_NAME", ch1.schema_name|| '.' || ch1.table_name AS "CHUNK_FULL_NAME"
Expand Down Expand Up @@ -1151,8 +1140,6 @@ ALTER TABLE table1 SET (timescaledb.compress, timescaledb.compress_segmentby = '
ERROR: constraint "fk_table1" requires column "col2" to be a timescaledb.compress_segmentby column for compression
-- Listing all fields of the compound key should succeed:
ALTER TABLE table1 SET (timescaledb.compress, timescaledb.compress_segmentby = 'col1,col2');
NOTICE: adding index _compressed_hypertable_23_col1__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_23 USING BTREE(col1, _ts_meta_sequence_num)
NOTICE: adding index _compressed_hypertable_23_col2__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_23 USING BTREE(col2, _ts_meta_sequence_num)
SELECT * FROM timescaledb_information.compression_settings ORDER BY table_name;
schema_name | table_name | attname | segmentby_column_index | orderby_column_index | orderby_asc | orderby_nullsfirst
-------------+----------------+-------------+------------------------+----------------------+-------------+--------------------
Expand Down Expand Up @@ -1363,7 +1350,6 @@ SELECT count(*) FROM approx_count;
(1 row)

ALTER TABLE approx_count SET (timescaledb.compress, timescaledb.compress_segmentby='device', timescaledb.compress_orderby = 'time DESC');
NOTICE: adding index _compressed_hypertable_30_device__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_30 USING BTREE(device, _ts_meta_sequence_num)
SELECT approximate_row_count('approx_count');
approximate_row_count
-----------------------
Expand Down
2 changes: 0 additions & 2 deletions tsl/test/expected/compression_bgw.out
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ ERROR: compression not enabled on hypertable "conditions"
-- TEST2 --
--add a policy to compress chunks --
alter table conditions set (timescaledb.compress, timescaledb.compress_segmentby = 'location', timescaledb.compress_orderby = 'time');
NOTICE: adding index _compressed_hypertable_2_location__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_2 USING BTREE(location, _ts_meta_sequence_num)
insert into conditions
select generate_series('2018-12-01 00:00'::timestamp, '2018-12-31 00:00'::timestamp, '1 day'), 'POR', 'klick', 55, 75;
select add_compression_policy('conditions', '60d'::interval) AS compressjob_id
Expand Down Expand Up @@ -193,7 +192,6 @@ SELECT device,
MIN(temperature) AS min_temperature
FROM conditions
GROUP BY device, time_bucket(INTERVAL '1 hour', "time") WITH NO DATA;
NOTICE: adding index _materialized_hypertable_8_device_day_idx ON _timescaledb_internal._materialized_hypertable_8 USING BTREE(device, day)
CALL refresh_continuous_aggregate('conditions_summary', NULL, NULL);
ALTER TABLE conditions SET (timescaledb.compress);
SELECT COUNT(*) AS dropped_chunks_count
Expand Down
2 changes: 0 additions & 2 deletions tsl/test/expected/compression_ddl.out
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ NOTICE: adding not-null constraint to column "Time"

INSERT INTO test1 SELECT t, gen_rand_minstd(), gen_rand_minstd(), gen_rand_minstd()::text FROM generate_series('2018-03-02 1:00'::TIMESTAMPTZ, '2018-03-28 1:00', '1 hour') t;
ALTER TABLE test1 set (timescaledb.compress, timescaledb.compress_segmentby = 'b', timescaledb.compress_orderby = '"Time" DESC');
NOTICE: adding index _compressed_hypertable_2_b__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_2 USING BTREE(b, _ts_meta_sequence_num)
SELECT COUNT(*) AS count_compressed
FROM
(
Expand Down Expand Up @@ -615,7 +614,6 @@ WHERE chunk.id IS NULL;

--can turn compression back on
ALTER TABLE test1 set (timescaledb.compress, timescaledb.compress_segmentby = 'b', timescaledb.compress_orderby = '"Time" DESC');
NOTICE: adding index _compressed_hypertable_4_b__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_4 USING BTREE(b, _ts_meta_sequence_num)
SELECT COUNT(*) AS count_compressed
FROM
(
Expand Down
14 changes: 0 additions & 14 deletions tsl/test/expected/compression_errors.out
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ ERROR: the option timescaledb.compress must be set to true to enable compressio
ALTER TABLE foo2 set (timescaledb.compress, timescaledb.compress_segmentby = '"bacB toD",c' , timescaledb.compress_orderby = 'c');
ERROR: cannot use column "c" in both timescaledb.compress_orderby and timescaledb.compress_segmentby
ALTER TABLE foo2 set (timescaledb.compress, timescaledb.compress_segmentby = '"bacB toD",c' , timescaledb.compress_orderby = 'd DESC');
NOTICE: adding index _compressed_hypertable_4_bacB toD__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_4 USING BTREE(bacB toD, _ts_meta_sequence_num)
NOTICE: adding index _compressed_hypertable_4_c__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_4 USING BTREE(c, _ts_meta_sequence_num)
ALTER TABLE foo2 set (timescaledb.compress, timescaledb.compress_segmentby = '"bacB toD",c' , timescaledb.compress_orderby = 'd');
NOTICE: adding index _compressed_hypertable_5_bacB toD__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_5 USING BTREE(bacB toD, _ts_meta_sequence_num)
NOTICE: adding index _compressed_hypertable_5_c__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_5 USING BTREE(c, _ts_meta_sequence_num)
create table with_rls (a integer, b integer);
ALTER TABLE with_rls ENABLE ROW LEVEL SECURITY;
select table_name from create_hypertable('with_rls', 'a', chunk_time_interval=> 10);
Expand All @@ -64,8 +60,6 @@ ALTER TABLE foo3 set (timescaledb.compress, timescaledb.compress_orderby='d DeSc
ALTER TABLE foo3 set (timescaledb.compress, timescaledb.compress_orderby='d Asc NullS lAsT');
--this is ok too
ALTER TABLE foo3 set (timescaledb.compress, timescaledb.compress_segmentby = '"bacB toD",c', timescaledb.compress_orderby = 'd DeSc NullS lAsT');
NOTICE: adding index _compressed_hypertable_9_bacB toD__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_9 USING BTREE(bacB toD, _ts_meta_sequence_num)
NOTICE: adding index _compressed_hypertable_9_c__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_9 USING BTREE(c, _ts_meta_sequence_num)
-- Negative test cases ---
ALTER TABLE foo2 set (timescaledb.compress, timescaledb.compress_segmentby = '"bacB toD",c');
ERROR: need to specify timescaledb.compress_orderby if it was previously set
Expand Down Expand Up @@ -184,7 +178,6 @@ FROM _timescaledb_catalog.chunk ch1, _timescaledb_catalog.hypertable ht where ch
ERROR: chunk "_hyper_11_2_chunk" is not compressed
--test changing the segment by columns
ALTER TABLE foo set (timescaledb.compress, timescaledb.compress_orderby = 'a', timescaledb.compress_segmentby = 'b');
NOTICE: adding index _compressed_hypertable_13_b__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_13 USING BTREE(b, _ts_meta_sequence_num)
select ch1.schema_name|| '.' || ch1.table_name AS "CHUNK_NAME"
FROM _timescaledb_catalog.chunk ch1, _timescaledb_catalog.hypertable ht where ch1.hypertable_id = ht.id and ht.table_name like 'foo' ORDER BY ch1.id limit 1 \gset
select decompress_chunk(:'CHUNK_NAME');
Expand Down Expand Up @@ -234,7 +227,6 @@ FROM _timescaledb_catalog.chunk ch1, _timescaledb_catalog.hypertable ht where ch

--should succeed
ALTER TABLE foo set (timescaledb.compress, timescaledb.compress_orderby = 'a', timescaledb.compress_segmentby = 'b');
NOTICE: adding index _compressed_hypertable_14_b__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_14 USING BTREE(b, _ts_meta_sequence_num)
select hc.* from _timescaledb_catalog.hypertable_compression hc inner join _timescaledb_catalog.hypertable h on (h.id = hc.hypertable_id) where h.table_name = 'foo' order by attname;
hypertable_id | attname | compression_algorithm_id | segmentby_column_index | orderby_column_index | orderby_asc | orderby_nullsfirst
---------------+---------+--------------------------+------------------------+----------------------+-------------+--------------------
Expand Down Expand Up @@ -281,9 +273,6 @@ ERROR: constraint table_constr_exclu is not supported for compression
alter table table_constr drop constraint table_constr_exclu ;
--now it works
ALTER TABLE table_constr set (timescaledb.compress, timescaledb.compress_orderby = 'timec', timescaledb.compress_segmentby = 'device_id, location, d');
NOTICE: adding index _compressed_hypertable_16_device_id__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_16 USING BTREE(device_id, _ts_meta_sequence_num)
NOTICE: adding index _compressed_hypertable_16_location__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_16 USING BTREE(location, _ts_meta_sequence_num)
NOTICE: adding index _compressed_hypertable_16_d__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_16 USING BTREE(d, _ts_meta_sequence_num)
--can't add fks after compression enabled
alter table table_constr add constraint table_constr_fk_add_after FOREIGN KEY(d) REFERENCES fortable(col) on delete cascade;
ERROR: operation not supported on hypertables that have compression enabled
Expand All @@ -304,7 +293,6 @@ SELECT create_hypertable('table_fk', 'time');

ALTER TABLE table_fk DROP COLUMN id1;
ALTER TABLE table_fk SET (timescaledb.compress,timescaledb.compress_segmentby = 'id2');
NOTICE: adding index _compressed_hypertable_18_id2__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_18 USING BTREE(id2, _ts_meta_sequence_num)
-- TEST fk cascade delete behavior on compressed chunk --
insert into fortable values(1);
insert into fortable values(10);
Expand Down Expand Up @@ -348,8 +336,6 @@ INSERT INTO table_constr2 VALUES( 1000, 10, 5, 99);
ALTER TABLE table_constr2 SET (timescaledb.compress, timescaledb.compress_segmentby = 'device_id');
ERROR: constraint "table_constr2_d_fkey" requires column "d" to be a timescaledb.compress_segmentby column for compression
ALTER TABLE table_constr2 SET (timescaledb.compress, timescaledb.compress_segmentby = 'device_id, d');
NOTICE: adding index _compressed_hypertable_20_device_id__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_20 USING BTREE(device_id, _ts_meta_sequence_num)
NOTICE: adding index _compressed_hypertable_20_d__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_20 USING BTREE(d, _ts_meta_sequence_num)
--compress a chunk and try to disable compression, it should fail --
SELECT ch1.schema_name|| '.' || ch1.table_name AS "CHUNK_NAME"
FROM _timescaledb_catalog.chunk ch1, _timescaledb_catalog.hypertable ht
Expand Down
2 changes: 0 additions & 2 deletions tsl/test/expected/compression_hypertable.out
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ select create_hypertable( 'test4', 'timec', chunk_time_interval=> '1 year'::inte
(1 row)

alter table test4 set (timescaledb.compress, timescaledb.compress_segmentby = 'location', timescaledb.compress_orderby = 'timec');
NOTICE: adding index _compressed_hypertable_6_location__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_6 USING BTREE(location, _ts_meta_sequence_num)
insert into test4
select generate_series('2018-01-01 00:00'::timestamp, '2018-01-31 00:00'::timestamp, '1 day'), 'NYC', 'klick', 55, 75;
insert into test4
Expand Down Expand Up @@ -543,7 +542,6 @@ SELECT create_hypertable('test6', 'time', chunk_time_interval=> 50);

ALTER TABLE test6 SET
(timescaledb.compress, timescaledb.compress_segmentby='device_id', timescaledb.compress_orderby = 'time DESC');
NOTICE: adding index _compressed_hypertable_10_device_id__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_10 USING BTREE(device_id, _ts_meta_sequence_num)
INSERT INTO test6 SELECT t, d, customtype_in((t + d)::TEXT::cstring)
FROM generate_series(1, 200) t, generate_series(1, 3) d;
INSERT INTO test6 SELECT t, NULL, customtype_in(t::TEXT::cstring)
Expand Down
1 change: 0 additions & 1 deletion tsl/test/expected/compression_permissions.out
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ ERROR: permission denied for table conditions
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
--now owner tries and succeeds --
alter table conditions set (timescaledb.compress, timescaledb.compress_segmentby = 'location', timescaledb.compress_orderby = 'timec');
NOTICE: adding index _compressed_hypertable_2_location__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_2 USING BTREE(location, _ts_meta_sequence_num)
insert into conditions
select generate_series('2018-12-01 00:00'::timestamp, '2018-12-31 00:00'::timestamp, '1 day'), 'POR', 'klick', 55, 75;
--try modifying compress properties --
Expand Down
1 change: 0 additions & 1 deletion tsl/test/expected/compression_qualpushdown-11.out
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ALTER TABLE hyper SET (
timescaledb.compress,
timescaledb.compress_orderby = 'time',
timescaledb.compress_segmentby = 'device_id');
NOTICE: adding index _compressed_hypertable_2_device_id__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_2 USING BTREE(device_id, _ts_meta_sequence_num)
INSERT INTO meta VALUES (1), (2), (3), (4), (5);
INSERT INTO hyper VALUES (1, 1, 1), (2, 2, 1), (3, 3, 1), (10, 3, 2), (11, 4, 2), (11, 5, 2);
SELECT ch1.table_name AS "CHUNK_NAME", ch1.schema_name|| '.' || ch1.table_name AS "CHUNK_FULL_NAME"
Expand Down
1 change: 0 additions & 1 deletion tsl/test/expected/compression_qualpushdown-12.out
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ALTER TABLE hyper SET (
timescaledb.compress,
timescaledb.compress_orderby = 'time',
timescaledb.compress_segmentby = 'device_id');
NOTICE: adding index _compressed_hypertable_2_device_id__ts_meta_sequence_num_idx ON _timescaledb_internal._compressed_hypertable_2 USING BTREE(device_id, _ts_meta_sequence_num)
INSERT INTO meta VALUES (1), (2), (3), (4), (5);
INSERT INTO hyper VALUES (1, 1, 1), (2, 2, 1), (3, 3, 1), (10, 3, 2), (11, 4, 2), (11, 5, 2);
SELECT ch1.table_name AS "CHUNK_NAME", ch1.schema_name|| '.' || ch1.table_name AS "CHUNK_FULL_NAME"
Expand Down