diff --git a/tsl/test/expected/compression_ddl.out b/tsl/test/expected/compression_ddl.out index a18b144d62b..232767c0bd0 100644 --- a/tsl/test/expected/compression_ddl.out +++ b/tsl/test/expected/compression_ddl.out @@ -2497,5 +2497,17 @@ select decompress_chunk(show_chunks('hyper_unique_deferred')); _timescaledb_internal._hyper_40_146_chunk (1 row) +\set ON_ERROR_STOP 0 begin; insert INTO hyper_unique_deferred values (1257987700000000000, 'dev1', 1); abort; ERROR: new row for relation "_hyper_40_146_chunk" violates check constraint "hyper_unique_deferred_sensor_1_check" +\set ON_ERROR_STOP 1 +select compress_chunk(show_chunks('hyper_unique_deferred')); + compress_chunk +------------------------------------------- + _timescaledb_internal._hyper_40_146_chunk +(1 row) + +\set ON_ERROR_STOP 0 +begin; insert INTO hyper_unique_deferred values (1257987700000000000, 'dev1', 1); abort; +ERROR: duplicate key value violates unique constraint "146_2_hyper_unique_deferred_time_key" +\set ON_ERROR_STOP 1 diff --git a/tsl/test/sql/compression_ddl.sql b/tsl/test/sql/compression_ddl.sql index ae372ceded1..ef14891a73a 100644 --- a/tsl/test/sql/compression_ddl.sql +++ b/tsl/test/sql/compression_ddl.sql @@ -996,6 +996,10 @@ INSERT INTO hyper_unique_deferred(time, device_id,sensor_1) VALUES (125798770000 alter table hyper_unique_deferred set (timescaledb.compress); select compress_chunk(show_chunks('hyper_unique_deferred')); -- also worked fine before 2.11.0 select decompress_chunk(show_chunks('hyper_unique_deferred')); +\set ON_ERROR_STOP 0 begin; insert INTO hyper_unique_deferred values (1257987700000000000, 'dev1', 1); abort; +\set ON_ERROR_STOP 1 select compress_chunk(show_chunks('hyper_unique_deferred')); +\set ON_ERROR_STOP 0 begin; insert INTO hyper_unique_deferred values (1257987700000000000, 'dev1', 1); abort; +\set ON_ERROR_STOP 1