From 847919a05f014f7ff2d7e6ccd27c316ad8ba64cf Mon Sep 17 00:00:00 2001 From: gayyappan Date: Wed, 3 Aug 2022 16:49:29 -0400 Subject: [PATCH] Add osm_chunk field to chunk catalog table Setting this field to true indicates that this is an OSM chunk. --- sql/pre_install/tables.sql | 3 +- src/chunk.c | 14 ++++---- src/hypertable_restrict_info.c | 2 ++ src/ts_catalog/catalog.c | 1 + src/ts_catalog/catalog.h | 8 +++++ test/expected/alter.out | 26 +++++++------- test/expected/create_hypertable.out | 12 +++---- test/expected/drop_owned.out | 18 +++++----- test/expected/drop_schema.out | 26 +++++++------- test/expected/insert-12.out | 12 +++---- test/expected/insert-13.out | 12 +++---- test/expected/insert-14.out | 12 +++---- test/expected/insert_single.out | 32 ++++++++--------- test/expected/truncate.out | 26 +++++++------- tsl/test/expected/cagg_ddl.out | 10 +++--- tsl/test/expected/cagg_ddl_dist_ht.out | 10 +++--- tsl/test/expected/compression_bgw.out | 12 +++---- tsl/test/expected/data_node.out | 36 +++++++++---------- tsl/test/expected/dist_compression.out | 46 ++++++++++++------------ tsl/test/expected/dist_hypertable-12.out | 16 ++++----- tsl/test/expected/dist_hypertable-13.out | 16 ++++----- tsl/test/expected/dist_hypertable-14.out | 16 ++++----- tsl/test/expected/remote_copy-12.out | 36 +++++++++---------- tsl/test/expected/remote_copy-13.out | 36 +++++++++---------- tsl/test/expected/remote_copy-14.out | 36 +++++++++---------- 25 files changed, 243 insertions(+), 231 deletions(-) diff --git a/sql/pre_install/tables.sql b/sql/pre_install/tables.sql index c86c55deb..db18b32d7 100644 --- a/sql/pre_install/tables.sql +++ b/sql/pre_install/tables.sql @@ -185,6 +185,7 @@ CREATE TABLE _timescaledb_catalog.chunk ( compressed_chunk_id integer , dropped boolean NOT NULL DEFAULT FALSE, status integer NOT NULL DEFAULT 0, + osm_chunk boolean NOT NULL DEFAULT FALSE, -- table constraints CONSTRAINT chunk_pkey PRIMARY KEY (id), CONSTRAINT chunk_schema_name_table_name_key UNIQUE (schema_name, table_name), @@ -194,8 +195,8 @@ CREATE TABLE _timescaledb_catalog.chunk ( ALTER SEQUENCE _timescaledb_catalog.chunk_id_seq OWNED BY _timescaledb_catalog.chunk.id; CREATE INDEX chunk_hypertable_id_idx ON _timescaledb_catalog.chunk (hypertable_id); - CREATE INDEX chunk_compressed_chunk_id_idx ON _timescaledb_catalog.chunk (compressed_chunk_id); +CREATE INDEX chunk_osm_chunk_idx ON _timescaledb_catalog.chunk ( osm_chunk ); SELECT pg_catalog.pg_extension_config_dump('_timescaledb_catalog.chunk', ''); SELECT pg_catalog.pg_extension_config_dump('_timescaledb_catalog.chunk_id_seq', ''); diff --git a/src/chunk.c b/src/chunk.c index 7b24e7f9f..5a3fc9594 100644 --- a/src/chunk.c +++ b/src/chunk.c @@ -175,12 +175,6 @@ static Chunk *chunk_resurrect(const Hypertable *ht, int chunk_id); */ #define CHUNK_STATUS_FROZEN 4 -/* A OSM table is added as a chunk to the hypertable. - * This is different from a distributed hypertable chunk that - * is managed by the Timescale extension. - */ -#define CHUNK_STATUS_FOREIGN 8 - static HeapTuple chunk_formdata_make_tuple(const FormData_chunk *fd, TupleDesc desc) { @@ -203,6 +197,7 @@ chunk_formdata_make_tuple(const FormData_chunk *fd, TupleDesc desc) } values[AttrNumberGetAttrOffset(Anum_chunk_dropped)] = BoolGetDatum(fd->dropped); values[AttrNumberGetAttrOffset(Anum_chunk_status)] = Int32GetDatum(fd->status); + values[AttrNumberGetAttrOffset(Anum_chunk_osm_chunk)] = BoolGetDatum(fd->osm_chunk); return heap_form_tuple(desc, values, nulls); } @@ -224,6 +219,7 @@ ts_chunk_formdata_fill(FormData_chunk *fd, const TupleInfo *ti) Assert(!nulls[AttrNumberGetAttrOffset(Anum_chunk_table_name)]); Assert(!nulls[AttrNumberGetAttrOffset(Anum_chunk_dropped)]); Assert(!nulls[AttrNumberGetAttrOffset(Anum_chunk_status)]); + Assert(!nulls[AttrNumberGetAttrOffset(Anum_chunk_osm_chunk)]); fd->id = DatumGetInt32(values[AttrNumberGetAttrOffset(Anum_chunk_id)]); fd->hypertable_id = DatumGetInt32(values[AttrNumberGetAttrOffset(Anum_chunk_hypertable_id)]); @@ -242,6 +238,7 @@ ts_chunk_formdata_fill(FormData_chunk *fd, const TupleInfo *ti) fd->dropped = DatumGetBool(values[AttrNumberGetAttrOffset(Anum_chunk_dropped)]); fd->status = DatumGetInt32(values[AttrNumberGetAttrOffset(Anum_chunk_status)]); + fd->osm_chunk = DatumGetBool(values[AttrNumberGetAttrOffset(Anum_chunk_osm_chunk)]); if (should_free) heap_freetuple(tuple); @@ -4461,6 +4458,9 @@ fill_hypercube_for_foreign_table_chunk(Hyperspace *hs) * * Does not add any inheritable constraints or indexes that are already * defined on the hypertable. + * + * This is used to add an OSM table as a chunk. + * Set the osm_chunk flag to true. */ static void add_foreign_table_as_chunk(Oid relid, Hypertable *parent_ht) @@ -4493,13 +4493,13 @@ add_foreign_table_as_chunk(Oid relid, Hypertable *parent_ht) /* fill in the correct table_name for the chunk*/ chunk->fd.hypertable_id = hs->hypertable_id; + chunk->fd.osm_chunk = true; /* this is an OSM chunk */ chunk->cube = fill_hypercube_for_foreign_table_chunk(hs); chunk->hypertable_relid = parent_ht->main_table_relid; chunk->constraints = ts_chunk_constraints_alloc(1, CurrentMemoryContext); namestrcpy(&chunk->fd.schema_name, relschema); namestrcpy(&chunk->fd.table_name, relname); - chunk->fd.status = CHUNK_STATUS_FOREIGN; /* Insert chunk */ ts_chunk_insert_lock(chunk, RowExclusiveLock); diff --git a/src/hypertable_restrict_info.c b/src/hypertable_restrict_info.c index ad7970216..0cf587ba5 100644 --- a/src/hypertable_restrict_info.c +++ b/src/hypertable_restrict_info.c @@ -494,6 +494,8 @@ scan_and_append_slices(ScanIterator *it, int old_nkeys, DimensionVec **dv, bool return *dv; } +/* search dimension_slice catalog table for slices that meet hri restriction + */ static List * gather_restriction_dimension_vectors(const HypertableRestrictInfo *hri) { diff --git a/src/ts_catalog/catalog.c b/src/ts_catalog/catalog.c index 667d34f23..e125a1f2d 100644 --- a/src/ts_catalog/catalog.c +++ b/src/ts_catalog/catalog.c @@ -164,6 +164,7 @@ static const TableIndexDef catalog_table_index_definitions[_MAX_CATALOG_TABLES] [CHUNK_HYPERTABLE_ID_INDEX] = "chunk_hypertable_id_idx", [CHUNK_SCHEMA_NAME_INDEX] = "chunk_schema_name_table_name_key", [CHUNK_COMPRESSED_CHUNK_ID_INDEX] = "chunk_compressed_chunk_id_idx", + [CHUNK_OSM_CHUNK_INDEX] = "chunk_osm_chunk_idx", }, }, [CHUNK_CONSTRAINT] = { diff --git a/src/ts_catalog/catalog.h b/src/ts_catalog/catalog.h index 3536180ce..146589aad 100644 --- a/src/ts_catalog/catalog.h +++ b/src/ts_catalog/catalog.h @@ -407,6 +407,7 @@ enum Anum_chunk Anum_chunk_compressed_chunk_id, Anum_chunk_dropped, Anum_chunk_status, + Anum_chunk_osm_chunk, _Anum_chunk_max, }; @@ -421,6 +422,7 @@ typedef struct FormData_chunk int32 compressed_chunk_id; bool dropped; int32 status; + bool osm_chunk; } FormData_chunk; typedef FormData_chunk *Form_chunk; @@ -431,6 +433,7 @@ enum CHUNK_HYPERTABLE_ID_INDEX, CHUNK_SCHEMA_NAME_INDEX, CHUNK_COMPRESSED_CHUNK_ID_INDEX, + CHUNK_OSM_CHUNK_INDEX, _MAX_CHUNK_INDEX, }; @@ -455,6 +458,11 @@ enum Anum_chunk_schema_name_idx Anum_chunk_schema_name_idx_table_name, }; +enum Anum_chunk_osm_chunk_idx +{ + Anum_chunk_osm_chunk_idx_osm_chunk = 1, +}; + /************************************ * * Chunk constraint table definitions diff --git a/test/expected/alter.out b/test/expected/alter.out index e62c83516..910cfffff 100644 --- a/test/expected/alter.out +++ b/test/expected/alter.out @@ -185,25 +185,25 @@ SELECT relname, reloptions FROM pg_class WHERE relname IN ('_hyper_2_3_chunk','_ -- Need superuser to ALTER chunks in _timescaledb_internal schema \c :TEST_DBNAME :ROLE_SUPERUSER SELECT * FROM _timescaledb_catalog.chunk WHERE id = 2; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------+---------------------+---------+-------- - 2 | 2 | _timescaledb_internal | _hyper_2_2_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------+---------------------+---------+--------+----------- + 2 | 2 | _timescaledb_internal | _hyper_2_2_chunk | | f | 0 | f (1 row) -- Rename chunk ALTER TABLE _timescaledb_internal._hyper_2_2_chunk RENAME TO new_chunk_name; SELECT * FROM _timescaledb_catalog.chunk WHERE id = 2; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+----------------+---------------------+---------+-------- - 2 | 2 | _timescaledb_internal | new_chunk_name | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+----------------+---------------------+---------+--------+----------- + 2 | 2 | _timescaledb_internal | new_chunk_name | | f | 0 | f (1 row) -- Set schema ALTER TABLE _timescaledb_internal.new_chunk_name SET SCHEMA public; SELECT * FROM _timescaledb_catalog.chunk WHERE id = 2; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-------------+----------------+---------------------+---------+-------- - 2 | 2 | public | new_chunk_name | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-------------+----------------+---------------------+---------+--------+----------- + 2 | 2 | public | new_chunk_name | | f | 0 | f (1 row) -- Test that we cannot rename chunk columns @@ -679,10 +679,10 @@ SELECT * from _timescaledb_catalog.hypertable; (1 row) SELECT * from _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+--------------------+---------------------+---------+-------- - 24 | 12 | new_associated_schema | _hyper_12_24_chunk | | f | 0 - 25 | 12 | new_associated_schema | _hyper_12_25_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+--------------------+---------------------+---------+--------+----------- + 24 | 12 | new_associated_schema | _hyper_12_24_chunk | | f | 0 | f + 25 | 12 | new_associated_schema | _hyper_12_25_chunk | | f | 0 | f (2 rows) DROP TABLE my_table; diff --git a/test/expected/create_hypertable.out b/test/expected/create_hypertable.out index f521c657c..4603830c2 100644 --- a/test/expected/create_hypertable.out +++ b/test/expected/create_hypertable.out @@ -544,12 +544,12 @@ select * from _timescaledb_catalog.hypertable where table_name = 'test_migrate'; (1 row) select * from _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+--------------------+---------------------+---------+-------- - 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 - 8 | 7 | _timescaledb_internal | _hyper_7_8_chunk | | f | 0 - 9 | 10 | _timescaledb_internal | _hyper_10_9_chunk | | f | 0 - 10 | 10 | _timescaledb_internal | _hyper_10_10_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+--------------------+---------------------+---------+--------+----------- + 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 | f + 8 | 7 | _timescaledb_internal | _hyper_7_8_chunk | | f | 0 | f + 9 | 10 | _timescaledb_internal | _hyper_10_9_chunk | | f | 0 | f + 10 | 10 | _timescaledb_internal | _hyper_10_10_chunk | | f | 0 | f (4 rows) select * from test_schema.test_migrate; diff --git a/test/expected/drop_owned.out b/test/expected/drop_owned.out index 7c9bed14f..2365b5145 100644 --- a/test/expected/drop_owned.out +++ b/test/expected/drop_owned.out @@ -32,10 +32,10 @@ SELECT * FROM _timescaledb_catalog.hypertable ORDER BY id; (2 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------+---------------------+---------+-------- - 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 - 2 | 2 | _timescaledb_internal | _hyper_2_2_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------+---------------------+---------+--------+----------- + 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 | f + 2 | 2 | _timescaledb_internal | _hyper_2_2_chunk | | f | 0 | f (2 rows) DROP OWNED BY :ROLE_DEFAULT_PERM_USER; @@ -46,9 +46,9 @@ SELECT * FROM _timescaledb_catalog.hypertable ORDER BY id; (1 row) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------+---------------------+---------+-------- - 2 | 2 | _timescaledb_internal | _hyper_2_2_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------+---------------------+---------+--------+----------- + 2 | 2 | _timescaledb_internal | _hyper_2_2_chunk | | f | 0 | f (1 row) DROP TABLE hypertable_schema.superuser; @@ -59,8 +59,8 @@ SELECT * FROM _timescaledb_catalog.hypertable GROUP BY id; (0 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-------------+------------+---------------------+---------+-------- + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-------------+------------+---------------------+---------+--------+----------- (0 rows) SELECT * FROM _timescaledb_catalog.dimension; diff --git a/test/expected/drop_schema.out b/test/expected/drop_schema.out index de6fe0310..113f4d44f 100644 --- a/test/expected/drop_schema.out +++ b/test/expected/drop_schema.out @@ -37,10 +37,10 @@ SELECT * FROM _timescaledb_catalog.hypertable ORDER BY id; (2 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+---------------+------------------+---------------------+---------+-------- - 1 | 1 | chunk_schema1 | _hyper_1_1_chunk | | f | 0 - 2 | 2 | chunk_schema2 | _hyper_2_2_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+---------------+------------------+---------------------+---------+--------+----------- + 1 | 1 | chunk_schema1 | _hyper_1_1_chunk | | f | 0 | f + 2 | 2 | chunk_schema2 | _hyper_2_2_chunk | | f | 0 | f (2 rows) RESET ROLE; @@ -60,18 +60,18 @@ SELECT * FROM _timescaledb_catalog.hypertable ORDER BY id; (2 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+---------------+------------------+---------------------+---------+-------- - 2 | 2 | chunk_schema2 | _hyper_2_2_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+---------------+------------------+---------------------+---------+--------+----------- + 2 | 2 | chunk_schema2 | _hyper_2_2_chunk | | f | 0 | f (1 row) --new chunk should be created in the internal associated schema INSERT INTO hypertable_schema.test1 VALUES ('2001-01-01 01:01:01', 23.3, 1); SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------+---------------------+---------+-------- - 2 | 2 | chunk_schema2 | _hyper_2_2_chunk | | f | 0 - 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------+---------------------+---------+--------+----------- + 2 | 2 | chunk_schema2 | _hyper_2_2_chunk | | f | 0 | f + 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 | f (2 rows) RESET ROLE; @@ -91,8 +91,8 @@ SELECT * FROM _timescaledb_catalog.hypertable GROUP BY id; (0 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-------------+------------+---------------------+---------+-------- + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-------------+------------+---------------------+---------+--------+----------- (0 rows) SELECT * FROM _timescaledb_catalog.dimension; diff --git a/test/expected/insert-12.out b/test/expected/insert-12.out index 3fd2c55c8..6158e6b1e 100644 --- a/test/expected/insert-12.out +++ b/test/expected/insert-12.out @@ -157,12 +157,12 @@ SELECT * FROM test.show_indexesp('_timescaledb_internal._hyper%'); (28 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------+---------------------+---------+-------- - 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 - 2 | 1 | _timescaledb_internal | _hyper_1_2_chunk | | f | 0 - 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 - 4 | 1 | _timescaledb_internal | _hyper_1_4_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------+---------------------+---------+--------+----------- + 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 | f + 2 | 1 | _timescaledb_internal | _hyper_1_2_chunk | | f | 0 | f + 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 | f + 4 | 1 | _timescaledb_internal | _hyper_1_4_chunk | | f | 0 | f (4 rows) SELECT * FROM "two_Partitions" ORDER BY "timeCustom", device_id, series_0, series_1; diff --git a/test/expected/insert-13.out b/test/expected/insert-13.out index f1eebe58f..df8ad3170 100644 --- a/test/expected/insert-13.out +++ b/test/expected/insert-13.out @@ -157,12 +157,12 @@ SELECT * FROM test.show_indexesp('_timescaledb_internal._hyper%'); (28 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------+---------------------+---------+-------- - 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 - 2 | 1 | _timescaledb_internal | _hyper_1_2_chunk | | f | 0 - 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 - 4 | 1 | _timescaledb_internal | _hyper_1_4_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------+---------------------+---------+--------+----------- + 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 | f + 2 | 1 | _timescaledb_internal | _hyper_1_2_chunk | | f | 0 | f + 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 | f + 4 | 1 | _timescaledb_internal | _hyper_1_4_chunk | | f | 0 | f (4 rows) SELECT * FROM "two_Partitions" ORDER BY "timeCustom", device_id, series_0, series_1; diff --git a/test/expected/insert-14.out b/test/expected/insert-14.out index f1eebe58f..df8ad3170 100644 --- a/test/expected/insert-14.out +++ b/test/expected/insert-14.out @@ -157,12 +157,12 @@ SELECT * FROM test.show_indexesp('_timescaledb_internal._hyper%'); (28 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------+---------------------+---------+-------- - 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 - 2 | 1 | _timescaledb_internal | _hyper_1_2_chunk | | f | 0 - 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 - 4 | 1 | _timescaledb_internal | _hyper_1_4_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------+---------------------+---------+--------+----------- + 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 | f + 2 | 1 | _timescaledb_internal | _hyper_1_2_chunk | | f | 0 | f + 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 | f + 4 | 1 | _timescaledb_internal | _hyper_1_4_chunk | | f | 0 | f (4 rows) SELECT * FROM "two_Partitions" ORDER BY "timeCustom", device_id, series_0, series_1; diff --git a/test/expected/insert_single.out b/test/expected/insert_single.out index 6681cb328..f4f6d8c0f 100644 --- a/test/expected/insert_single.out +++ b/test/expected/insert_single.out @@ -242,22 +242,22 @@ SELECT * FROM "1dim_neg"; (7 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+-------------------+---------------------+---------+-------- - 1 | 1 | one_Partition | _hyper_1_1_chunk | | f | 0 - 2 | 1 | one_Partition | _hyper_1_2_chunk | | f | 0 - 3 | 1 | one_Partition | _hyper_1_3_chunk | | f | 0 - 4 | 2 | _timescaledb_internal | _hyper_2_4_chunk | | f | 0 - 5 | 3 | _timescaledb_internal | _hyper_3_5_chunk | | f | 0 - 6 | 3 | _timescaledb_internal | _hyper_3_6_chunk | | f | 0 - 7 | 3 | _timescaledb_internal | _hyper_3_7_chunk | | f | 0 - 8 | 3 | _timescaledb_internal | _hyper_3_8_chunk | | f | 0 - 10 | 5 | _timescaledb_internal | _hyper_5_10_chunk | | f | 0 - 11 | 6 | _timescaledb_internal | _hyper_6_11_chunk | | f | 0 - 12 | 6 | _timescaledb_internal | _hyper_6_12_chunk | | f | 0 - 13 | 6 | _timescaledb_internal | _hyper_6_13_chunk | | f | 0 - 14 | 6 | _timescaledb_internal | _hyper_6_14_chunk | | f | 0 - 15 | 6 | _timescaledb_internal | _hyper_6_15_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+-------------------+---------------------+---------+--------+----------- + 1 | 1 | one_Partition | _hyper_1_1_chunk | | f | 0 | f + 2 | 1 | one_Partition | _hyper_1_2_chunk | | f | 0 | f + 3 | 1 | one_Partition | _hyper_1_3_chunk | | f | 0 | f + 4 | 2 | _timescaledb_internal | _hyper_2_4_chunk | | f | 0 | f + 5 | 3 | _timescaledb_internal | _hyper_3_5_chunk | | f | 0 | f + 6 | 3 | _timescaledb_internal | _hyper_3_6_chunk | | f | 0 | f + 7 | 3 | _timescaledb_internal | _hyper_3_7_chunk | | f | 0 | f + 8 | 3 | _timescaledb_internal | _hyper_3_8_chunk | | f | 0 | f + 10 | 5 | _timescaledb_internal | _hyper_5_10_chunk | | f | 0 | f + 11 | 6 | _timescaledb_internal | _hyper_6_11_chunk | | f | 0 | f + 12 | 6 | _timescaledb_internal | _hyper_6_12_chunk | | f | 0 | f + 13 | 6 | _timescaledb_internal | _hyper_6_13_chunk | | f | 0 | f + 14 | 6 | _timescaledb_internal | _hyper_6_14_chunk | | f | 0 | f + 15 | 6 | _timescaledb_internal | _hyper_6_15_chunk | | f | 0 | f (14 rows) SELECT * FROM _timescaledb_catalog.dimension_slice; diff --git a/test/expected/truncate.out b/test/expected/truncate.out index e82555b3b..701328c55 100644 --- a/test/expected/truncate.out +++ b/test/expected/truncate.out @@ -41,12 +41,12 @@ SELECT * FROM _timescaledb_catalog.hypertable; (1 row) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------+---------------------+---------+-------- - 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 - 2 | 1 | _timescaledb_internal | _hyper_1_2_chunk | | f | 0 - 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 - 4 | 1 | _timescaledb_internal | _hyper_1_4_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------+---------------------+---------+--------+----------- + 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | | f | 0 | f + 2 | 1 | _timescaledb_internal | _hyper_1_2_chunk | | f | 0 | f + 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 | f + 4 | 1 | _timescaledb_internal | _hyper_1_4_chunk | | f | 0 | f (4 rows) SELECT * FROM test.show_subtables('"two_Partitions"'); @@ -84,8 +84,8 @@ SELECT * FROM _timescaledb_catalog.hypertable; (1 row) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-------------+------------+---------------------+---------+-------- + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-------------+------------+---------------------+---------+--------+----------- (0 rows) -- should be empty @@ -105,11 +105,11 @@ INSERT INTO public."two_Partitions"("timeCustom", device_id, series_0, series_1) (1257894000000000000, 'dev2', 1.5, 1), (1257894002000000000, 'dev1', 2.5, 3); SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------+---------------------+---------+-------- - 5 | 1 | _timescaledb_internal | _hyper_1_5_chunk | | f | 0 - 6 | 1 | _timescaledb_internal | _hyper_1_6_chunk | | f | 0 - 7 | 1 | _timescaledb_internal | _hyper_1_7_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------+---------------------+---------+--------+----------- + 5 | 1 | _timescaledb_internal | _hyper_1_5_chunk | | f | 0 | f + 6 | 1 | _timescaledb_internal | _hyper_1_6_chunk | | f | 0 | f + 7 | 1 | _timescaledb_internal | _hyper_1_7_chunk | | f | 0 | f (3 rows) CREATE VIEW dependent_view AS SELECT * FROM _timescaledb_internal._hyper_1_5_chunk; diff --git a/tsl/test/expected/cagg_ddl.out b/tsl/test/expected/cagg_ddl.out index cdda873bc..42b8e3cc9 100644 --- a/tsl/test/expected/cagg_ddl.out +++ b/tsl/test/expected/cagg_ddl.out @@ -633,11 +633,11 @@ SELECT * FROM drop_chunks_table ORDER BY time ASC limit 1; --we see the chunks row with the dropped flags set; SELECT * FROM _timescaledb_catalog.chunk where dropped; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+--------------------+---------------------+---------+-------- - 13 | 10 | _timescaledb_internal | _hyper_10_13_chunk | | t | 0 - 14 | 10 | _timescaledb_internal | _hyper_10_14_chunk | | t | 0 - 15 | 10 | _timescaledb_internal | _hyper_10_15_chunk | | t | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+--------------------+---------------------+---------+--------+----------- + 13 | 10 | _timescaledb_internal | _hyper_10_13_chunk | | t | 0 | f + 14 | 10 | _timescaledb_internal | _hyper_10_14_chunk | | t | 0 | f + 15 | 10 | _timescaledb_internal | _hyper_10_15_chunk | | t | 0 | f (3 rows) --still see data in the view diff --git a/tsl/test/expected/cagg_ddl_dist_ht.out b/tsl/test/expected/cagg_ddl_dist_ht.out index 90d98760a..58c6e1800 100644 --- a/tsl/test/expected/cagg_ddl_dist_ht.out +++ b/tsl/test/expected/cagg_ddl_dist_ht.out @@ -665,11 +665,11 @@ SELECT * FROM drop_chunks_table ORDER BY time ASC limit 1; --we see the chunks row with the dropped flags set; SELECT * FROM _timescaledb_catalog.chunk where dropped; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+-------------------------+---------------------+---------+-------- - 13 | 10 | _timescaledb_internal | _dist_hyper_10_13_chunk | | t | 0 - 14 | 10 | _timescaledb_internal | _dist_hyper_10_14_chunk | | t | 0 - 15 | 10 | _timescaledb_internal | _dist_hyper_10_15_chunk | | t | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+-------------------------+---------------------+---------+--------+----------- + 13 | 10 | _timescaledb_internal | _dist_hyper_10_13_chunk | | t | 0 | f + 14 | 10 | _timescaledb_internal | _dist_hyper_10_14_chunk | | t | 0 | f + 15 | 10 | _timescaledb_internal | _dist_hyper_10_15_chunk | | t | 0 | f (3 rows) --still see data in the view diff --git a/tsl/test/expected/compression_bgw.out b/tsl/test/expected/compression_bgw.out index a5dc55685..20469716b 100644 --- a/tsl/test/expected/compression_bgw.out +++ b/tsl/test/expected/compression_bgw.out @@ -71,12 +71,12 @@ from chunk_compression_stats('conditions') where compression_status like 'Compre (1 row) SELECT * FROM _timescaledb_catalog.chunk ORDER BY id; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+--------------------------+---------------------+---------+-------- - 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | 4 | f | 1 - 2 | 1 | _timescaledb_internal | _hyper_1_2_chunk | | f | 0 - 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 - 4 | 2 | _timescaledb_internal | compress_hyper_2_4_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+--------------------------+---------------------+---------+--------+----------- + 1 | 1 | _timescaledb_internal | _hyper_1_1_chunk | 4 | f | 1 | f + 2 | 1 | _timescaledb_internal | _hyper_1_2_chunk | | f | 0 | f + 3 | 1 | _timescaledb_internal | _hyper_1_3_chunk | | f | 0 | f + 4 | 2 | _timescaledb_internal | compress_hyper_2_4_chunk | | f | 0 | f (4 rows) -- TEST 4 -- diff --git a/tsl/test/expected/data_node.out b/tsl/test/expected/data_node.out index d33561496..17083c304 100644 --- a/tsl/test/expected/data_node.out +++ b/tsl/test/expected/data_node.out @@ -433,11 +433,11 @@ SELECT * FROM test.show_subtables('disttable'); (3 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+-----------------------+---------------------+---------+-------- - 2 | 3 | _timescaledb_internal | _dist_hyper_3_2_chunk | | f | 0 - 3 | 3 | _timescaledb_internal | _dist_hyper_3_3_chunk | | f | 0 - 4 | 3 | _timescaledb_internal | _dist_hyper_3_4_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+-----------------------+---------------------+---------+--------+----------- + 2 | 3 | _timescaledb_internal | _dist_hyper_3_2_chunk | | f | 0 | f + 3 | 3 | _timescaledb_internal | _dist_hyper_3_3_chunk | | f | 0 | f + 4 | 3 | _timescaledb_internal | _dist_hyper_3_4_chunk | | f | 0 | f (3 rows) SELECT * FROM _timescaledb_catalog.hypertable_data_node; @@ -586,10 +586,10 @@ ORDER BY foreign_table_name; (2 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+-----------------------+---------------------+---------+-------- - 3 | 3 | _timescaledb_internal | _dist_hyper_3_3_chunk | | f | 0 - 4 | 3 | _timescaledb_internal | _dist_hyper_3_4_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+-----------------------+---------------------+---------+--------+----------- + 3 | 3 | _timescaledb_internal | _dist_hyper_3_3_chunk | | f | 0 | f + 4 | 3 | _timescaledb_internal | _dist_hyper_3_4_chunk | | f | 0 | f (2 rows) SELECT * FROM _timescaledb_catalog.hypertable_data_node; @@ -636,8 +636,8 @@ SELECT * FROM _timescaledb_catalog.chunk_data_node; (0 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-------------+------------+---------------------+---------+-------- + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-------------+------------+---------------------+---------+--------+----------- (0 rows) -- Attach data node should now succeed @@ -828,8 +828,8 @@ SELECT * FROM _timescaledb_catalog.chunk_data_node; (0 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-------------+------------+---------------------+---------+-------- + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-------------+------------+---------------------+---------+--------+----------- (0 rows) \set ON_ERROR_STOP 0 @@ -898,11 +898,11 @@ SELECT * FROM test.show_subtables('disttable'); (3 rows) SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+-----------------------+---------------------+---------+-------- - 5 | 5 | _timescaledb_internal | _dist_hyper_5_5_chunk | | f | 0 - 6 | 5 | _timescaledb_internal | _dist_hyper_5_6_chunk | | f | 0 - 7 | 5 | _timescaledb_internal | _dist_hyper_5_7_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+-----------------------+---------------------+---------+--------+----------- + 5 | 5 | _timescaledb_internal | _dist_hyper_5_5_chunk | | f | 0 | f + 6 | 5 | _timescaledb_internal | _dist_hyper_5_6_chunk | | f | 0 | f + 7 | 5 | _timescaledb_internal | _dist_hyper_5_7_chunk | | f | 0 | f (3 rows) SELECT * FROM _timescaledb_catalog.hypertable_data_node; diff --git a/tsl/test/expected/dist_compression.out b/tsl/test/expected/dist_compression.out index 259e6368c..3e6b36aea 100644 --- a/tsl/test/expected/dist_compression.out +++ b/tsl/test/expected/dist_compression.out @@ -287,36 +287,36 @@ $$); NOTICE: [db_dist_compression_1]: SELECT * FROM _timescaledb_catalog.chunk ORDER BY id NOTICE: [db_dist_compression_1]: -id|hypertable_id|schema_name |table_name |compressed_chunk_id|dropped|status ---+-------------+---------------------+------------------------+-------------------+-------+------ - 1| 1|_timescaledb_internal|_dist_hyper_1_1_chunk | 5|f | 1 - 2| 1|_timescaledb_internal|_dist_hyper_1_3_chunk | 6|f | 1 - 5| 2|_timescaledb_internal|compress_hyper_2_5_chunk| |f | 0 - 6| 2|_timescaledb_internal|compress_hyper_2_6_chunk| |f | 0 +id|hypertable_id|schema_name |table_name |compressed_chunk_id|dropped|status|osm_chunk +--+-------------+---------------------+------------------------+-------------------+-------+------+--------- + 1| 1|_timescaledb_internal|_dist_hyper_1_1_chunk | 5|f | 1|f + 2| 1|_timescaledb_internal|_dist_hyper_1_3_chunk | 6|f | 1|f + 5| 2|_timescaledb_internal|compress_hyper_2_5_chunk| |f | 0|f + 6| 2|_timescaledb_internal|compress_hyper_2_6_chunk| |f | 0|f (4 rows) NOTICE: [db_dist_compression_2]: SELECT * FROM _timescaledb_catalog.chunk ORDER BY id NOTICE: [db_dist_compression_2]: -id|hypertable_id|schema_name |table_name |compressed_chunk_id|dropped|status ---+-------------+---------------------+------------------------+-------------------+-------+------ - 1| 1|_timescaledb_internal|_dist_hyper_1_1_chunk | 5|f | 1 - 2| 1|_timescaledb_internal|_dist_hyper_1_2_chunk | 6|f | 1 - 5| 2|_timescaledb_internal|compress_hyper_2_5_chunk| |f | 0 - 6| 2|_timescaledb_internal|compress_hyper_2_6_chunk| |f | 0 +id|hypertable_id|schema_name |table_name |compressed_chunk_id|dropped|status|osm_chunk +--+-------------+---------------------+------------------------+-------------------+-------+------+--------- + 1| 1|_timescaledb_internal|_dist_hyper_1_1_chunk | 5|f | 1|f + 2| 1|_timescaledb_internal|_dist_hyper_1_2_chunk | 6|f | 1|f + 5| 2|_timescaledb_internal|compress_hyper_2_5_chunk| |f | 0|f + 6| 2|_timescaledb_internal|compress_hyper_2_6_chunk| |f | 0|f (4 rows) NOTICE: [db_dist_compression_3]: SELECT * FROM _timescaledb_catalog.chunk ORDER BY id NOTICE: [db_dist_compression_3]: -id|hypertable_id|schema_name |table_name |compressed_chunk_id|dropped|status ---+-------------+---------------------+------------------------+-------------------+-------+------ - 1| 1|_timescaledb_internal|_dist_hyper_1_2_chunk | 4|f | 1 - 2| 1|_timescaledb_internal|_dist_hyper_1_3_chunk | 3|f | 1 - 3| 2|_timescaledb_internal|compress_hyper_2_3_chunk| |f | 0 - 4| 2|_timescaledb_internal|compress_hyper_2_4_chunk| |f | 0 +id|hypertable_id|schema_name |table_name |compressed_chunk_id|dropped|status|osm_chunk +--+-------------+---------------------+------------------------+-------------------+-------+------+--------- + 1| 1|_timescaledb_internal|_dist_hyper_1_2_chunk | 4|f | 1|f + 2| 1|_timescaledb_internal|_dist_hyper_1_3_chunk | 3|f | 1|f + 3| 2|_timescaledb_internal|compress_hyper_2_3_chunk| |f | 0|f + 4| 2|_timescaledb_internal|compress_hyper_2_4_chunk| |f | 0|f (4 rows) @@ -694,11 +694,11 @@ from chunk_compression_stats('conditions') where compression_status like 'Compre (2 rows) SELECT * FROM _timescaledb_catalog.chunk ORDER BY id; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+-----------------------+---------------------+---------+-------- - 6 | 2 | _timescaledb_internal | _dist_hyper_2_6_chunk | | f | 1 - 7 | 2 | _timescaledb_internal | _dist_hyper_2_7_chunk | | f | 0 - 8 | 2 | _timescaledb_internal | _dist_hyper_2_8_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+-----------------------+---------------------+---------+--------+----------- + 6 | 2 | _timescaledb_internal | _dist_hyper_2_6_chunk | | f | 1 | f + 7 | 2 | _timescaledb_internal | _dist_hyper_2_7_chunk | | f | 0 | f + 8 | 2 | _timescaledb_internal | _dist_hyper_2_8_chunk | | f | 0 | f (3 rows) -- TEST 4 -- diff --git a/tsl/test/expected/dist_hypertable-12.out b/tsl/test/expected/dist_hypertable-12.out index a8235ed77..4fd85b5f9 100644 --- a/tsl/test/expected/dist_hypertable-12.out +++ b/tsl/test/expected/dist_hypertable-12.out @@ -1667,8 +1667,8 @@ SELECT * FROM disttable; -- Metadata and tables cleaned up SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-------------+------------+---------------------+---------+-------- + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-------------+------------+---------------------+---------+--------+----------- (0 rows) SELECT * FROM show_chunks('disttable'); @@ -1685,8 +1685,8 @@ $$); NOTICE: [db_dist_hypertable_1]: SELECT * FROM _timescaledb_catalog.chunk NOTICE: [db_dist_hypertable_1]: -id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status ---+-------------+-----------+----------+-------------------+-------+------ +id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status|osm_chunk +--+-------------+-----------+----------+-------------------+-------+------+--------- (0 rows) @@ -1709,8 +1709,8 @@ time|device|temp|Color NOTICE: [db_dist_hypertable_2]: SELECT * FROM _timescaledb_catalog.chunk NOTICE: [db_dist_hypertable_2]: -id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status ---+-------------+-----------+----------+-------------------+-------+------ +id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status|osm_chunk +--+-------------+-----------+----------+-------------------+-------+------+--------- (0 rows) @@ -1733,8 +1733,8 @@ time|device|temp|Color NOTICE: [db_dist_hypertable_3]: SELECT * FROM _timescaledb_catalog.chunk NOTICE: [db_dist_hypertable_3]: -id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status ---+-------------+-----------+----------+-------------------+-------+------ +id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status|osm_chunk +--+-------------+-----------+----------+-------------------+-------+------+--------- (0 rows) diff --git a/tsl/test/expected/dist_hypertable-13.out b/tsl/test/expected/dist_hypertable-13.out index 906b3e6ff..7c9ed615a 100644 --- a/tsl/test/expected/dist_hypertable-13.out +++ b/tsl/test/expected/dist_hypertable-13.out @@ -1666,8 +1666,8 @@ SELECT * FROM disttable; -- Metadata and tables cleaned up SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-------------+------------+---------------------+---------+-------- + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-------------+------------+---------------------+---------+--------+----------- (0 rows) SELECT * FROM show_chunks('disttable'); @@ -1684,8 +1684,8 @@ $$); NOTICE: [db_dist_hypertable_1]: SELECT * FROM _timescaledb_catalog.chunk NOTICE: [db_dist_hypertable_1]: -id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status ---+-------------+-----------+----------+-------------------+-------+------ +id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status|osm_chunk +--+-------------+-----------+----------+-------------------+-------+------+--------- (0 rows) @@ -1708,8 +1708,8 @@ time|device|temp|Color NOTICE: [db_dist_hypertable_2]: SELECT * FROM _timescaledb_catalog.chunk NOTICE: [db_dist_hypertable_2]: -id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status ---+-------------+-----------+----------+-------------------+-------+------ +id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status|osm_chunk +--+-------------+-----------+----------+-------------------+-------+------+--------- (0 rows) @@ -1732,8 +1732,8 @@ time|device|temp|Color NOTICE: [db_dist_hypertable_3]: SELECT * FROM _timescaledb_catalog.chunk NOTICE: [db_dist_hypertable_3]: -id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status ---+-------------+-----------+----------+-------------------+-------+------ +id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status|osm_chunk +--+-------------+-----------+----------+-------------------+-------+------+--------- (0 rows) diff --git a/tsl/test/expected/dist_hypertable-14.out b/tsl/test/expected/dist_hypertable-14.out index 2beace66b..d20bae757 100644 --- a/tsl/test/expected/dist_hypertable-14.out +++ b/tsl/test/expected/dist_hypertable-14.out @@ -1670,8 +1670,8 @@ SELECT * FROM disttable; -- Metadata and tables cleaned up SELECT * FROM _timescaledb_catalog.chunk; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-------------+------------+---------------------+---------+-------- + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-------------+------------+---------------------+---------+--------+----------- (0 rows) SELECT * FROM show_chunks('disttable'); @@ -1688,8 +1688,8 @@ $$); NOTICE: [db_dist_hypertable_1]: SELECT * FROM _timescaledb_catalog.chunk NOTICE: [db_dist_hypertable_1]: -id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status ---+-------------+-----------+----------+-------------------+-------+------ +id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status|osm_chunk +--+-------------+-----------+----------+-------------------+-------+------+--------- (0 rows) @@ -1712,8 +1712,8 @@ time|device|temp|Color NOTICE: [db_dist_hypertable_2]: SELECT * FROM _timescaledb_catalog.chunk NOTICE: [db_dist_hypertable_2]: -id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status ---+-------------+-----------+----------+-------------------+-------+------ +id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status|osm_chunk +--+-------------+-----------+----------+-------------------+-------+------+--------- (0 rows) @@ -1736,8 +1736,8 @@ time|device|temp|Color NOTICE: [db_dist_hypertable_3]: SELECT * FROM _timescaledb_catalog.chunk NOTICE: [db_dist_hypertable_3]: -id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status ---+-------------+-----------+----------+-------------------+-------+------ +id|hypertable_id|schema_name|table_name|compressed_chunk_id|dropped|status|osm_chunk +--+-------------+-----------+----------+-------------------+-------+------+--------- (0 rows) diff --git a/tsl/test/expected/remote_copy-12.out b/tsl/test/expected/remote_copy-12.out index 4d92cf5d4..e28a401ed 100644 --- a/tsl/test/expected/remote_copy-12.out +++ b/tsl/test/expected/remote_copy-12.out @@ -100,24 +100,24 @@ SELECT * FROM "+ri(k33_')" ORDER BY 1; (18 rows) SELECT * FROM _timescaledb_catalog.chunk ORDER BY 1; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------------+---------------------+---------+-------- - 1 | 1 | _timescaledb_internal | _dist_hyper_1_1_chunk | | f | 0 - 2 | 1 | _timescaledb_internal | _dist_hyper_1_2_chunk | | f | 0 - 3 | 1 | _timescaledb_internal | _dist_hyper_1_3_chunk | | f | 0 - 4 | 1 | _timescaledb_internal | _dist_hyper_1_4_chunk | | f | 0 - 5 | 1 | _timescaledb_internal | _dist_hyper_1_5_chunk | | f | 0 - 6 | 1 | _timescaledb_internal | _dist_hyper_1_6_chunk | | f | 0 - 7 | 1 | _timescaledb_internal | _dist_hyper_1_7_chunk | | f | 0 - 8 | 1 | _timescaledb_internal | _dist_hyper_1_8_chunk | | f | 0 - 12 | 1 | _timescaledb_internal | _dist_hyper_1_12_chunk | | f | 0 - 13 | 1 | _timescaledb_internal | _dist_hyper_1_13_chunk | | f | 0 - 14 | 1 | _timescaledb_internal | _dist_hyper_1_14_chunk | | f | 0 - 15 | 1 | _timescaledb_internal | _dist_hyper_1_15_chunk | | f | 0 - 16 | 1 | _timescaledb_internal | _dist_hyper_1_16_chunk | | f | 0 - 17 | 1 | _timescaledb_internal | _dist_hyper_1_17_chunk | | f | 0 - 18 | 1 | _timescaledb_internal | _dist_hyper_1_18_chunk | | f | 0 - 19 | 1 | _timescaledb_internal | _dist_hyper_1_19_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------------+---------------------+---------+--------+----------- + 1 | 1 | _timescaledb_internal | _dist_hyper_1_1_chunk | | f | 0 | f + 2 | 1 | _timescaledb_internal | _dist_hyper_1_2_chunk | | f | 0 | f + 3 | 1 | _timescaledb_internal | _dist_hyper_1_3_chunk | | f | 0 | f + 4 | 1 | _timescaledb_internal | _dist_hyper_1_4_chunk | | f | 0 | f + 5 | 1 | _timescaledb_internal | _dist_hyper_1_5_chunk | | f | 0 | f + 6 | 1 | _timescaledb_internal | _dist_hyper_1_6_chunk | | f | 0 | f + 7 | 1 | _timescaledb_internal | _dist_hyper_1_7_chunk | | f | 0 | f + 8 | 1 | _timescaledb_internal | _dist_hyper_1_8_chunk | | f | 0 | f + 12 | 1 | _timescaledb_internal | _dist_hyper_1_12_chunk | | f | 0 | f + 13 | 1 | _timescaledb_internal | _dist_hyper_1_13_chunk | | f | 0 | f + 14 | 1 | _timescaledb_internal | _dist_hyper_1_14_chunk | | f | 0 | f + 15 | 1 | _timescaledb_internal | _dist_hyper_1_15_chunk | | f | 0 | f + 16 | 1 | _timescaledb_internal | _dist_hyper_1_16_chunk | | f | 0 | f + 17 | 1 | _timescaledb_internal | _dist_hyper_1_17_chunk | | f | 0 | f + 18 | 1 | _timescaledb_internal | _dist_hyper_1_18_chunk | | f | 0 | f + 19 | 1 | _timescaledb_internal | _dist_hyper_1_19_chunk | | f | 0 | f (16 rows) SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1, 3; diff --git a/tsl/test/expected/remote_copy-13.out b/tsl/test/expected/remote_copy-13.out index c550227d3..efd5dddda 100644 --- a/tsl/test/expected/remote_copy-13.out +++ b/tsl/test/expected/remote_copy-13.out @@ -100,24 +100,24 @@ SELECT * FROM "+ri(k33_')" ORDER BY 1; (18 rows) SELECT * FROM _timescaledb_catalog.chunk ORDER BY 1; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------------+---------------------+---------+-------- - 1 | 1 | _timescaledb_internal | _dist_hyper_1_1_chunk | | f | 0 - 2 | 1 | _timescaledb_internal | _dist_hyper_1_2_chunk | | f | 0 - 3 | 1 | _timescaledb_internal | _dist_hyper_1_3_chunk | | f | 0 - 4 | 1 | _timescaledb_internal | _dist_hyper_1_4_chunk | | f | 0 - 5 | 1 | _timescaledb_internal | _dist_hyper_1_5_chunk | | f | 0 - 6 | 1 | _timescaledb_internal | _dist_hyper_1_6_chunk | | f | 0 - 7 | 1 | _timescaledb_internal | _dist_hyper_1_7_chunk | | f | 0 - 8 | 1 | _timescaledb_internal | _dist_hyper_1_8_chunk | | f | 0 - 12 | 1 | _timescaledb_internal | _dist_hyper_1_12_chunk | | f | 0 - 13 | 1 | _timescaledb_internal | _dist_hyper_1_13_chunk | | f | 0 - 14 | 1 | _timescaledb_internal | _dist_hyper_1_14_chunk | | f | 0 - 15 | 1 | _timescaledb_internal | _dist_hyper_1_15_chunk | | f | 0 - 16 | 1 | _timescaledb_internal | _dist_hyper_1_16_chunk | | f | 0 - 17 | 1 | _timescaledb_internal | _dist_hyper_1_17_chunk | | f | 0 - 18 | 1 | _timescaledb_internal | _dist_hyper_1_18_chunk | | f | 0 - 19 | 1 | _timescaledb_internal | _dist_hyper_1_19_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------------+---------------------+---------+--------+----------- + 1 | 1 | _timescaledb_internal | _dist_hyper_1_1_chunk | | f | 0 | f + 2 | 1 | _timescaledb_internal | _dist_hyper_1_2_chunk | | f | 0 | f + 3 | 1 | _timescaledb_internal | _dist_hyper_1_3_chunk | | f | 0 | f + 4 | 1 | _timescaledb_internal | _dist_hyper_1_4_chunk | | f | 0 | f + 5 | 1 | _timescaledb_internal | _dist_hyper_1_5_chunk | | f | 0 | f + 6 | 1 | _timescaledb_internal | _dist_hyper_1_6_chunk | | f | 0 | f + 7 | 1 | _timescaledb_internal | _dist_hyper_1_7_chunk | | f | 0 | f + 8 | 1 | _timescaledb_internal | _dist_hyper_1_8_chunk | | f | 0 | f + 12 | 1 | _timescaledb_internal | _dist_hyper_1_12_chunk | | f | 0 | f + 13 | 1 | _timescaledb_internal | _dist_hyper_1_13_chunk | | f | 0 | f + 14 | 1 | _timescaledb_internal | _dist_hyper_1_14_chunk | | f | 0 | f + 15 | 1 | _timescaledb_internal | _dist_hyper_1_15_chunk | | f | 0 | f + 16 | 1 | _timescaledb_internal | _dist_hyper_1_16_chunk | | f | 0 | f + 17 | 1 | _timescaledb_internal | _dist_hyper_1_17_chunk | | f | 0 | f + 18 | 1 | _timescaledb_internal | _dist_hyper_1_18_chunk | | f | 0 | f + 19 | 1 | _timescaledb_internal | _dist_hyper_1_19_chunk | | f | 0 | f (16 rows) SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1, 3; diff --git a/tsl/test/expected/remote_copy-14.out b/tsl/test/expected/remote_copy-14.out index c550227d3..efd5dddda 100644 --- a/tsl/test/expected/remote_copy-14.out +++ b/tsl/test/expected/remote_copy-14.out @@ -100,24 +100,24 @@ SELECT * FROM "+ri(k33_')" ORDER BY 1; (18 rows) SELECT * FROM _timescaledb_catalog.chunk ORDER BY 1; - id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status -----+---------------+-----------------------+------------------------+---------------------+---------+-------- - 1 | 1 | _timescaledb_internal | _dist_hyper_1_1_chunk | | f | 0 - 2 | 1 | _timescaledb_internal | _dist_hyper_1_2_chunk | | f | 0 - 3 | 1 | _timescaledb_internal | _dist_hyper_1_3_chunk | | f | 0 - 4 | 1 | _timescaledb_internal | _dist_hyper_1_4_chunk | | f | 0 - 5 | 1 | _timescaledb_internal | _dist_hyper_1_5_chunk | | f | 0 - 6 | 1 | _timescaledb_internal | _dist_hyper_1_6_chunk | | f | 0 - 7 | 1 | _timescaledb_internal | _dist_hyper_1_7_chunk | | f | 0 - 8 | 1 | _timescaledb_internal | _dist_hyper_1_8_chunk | | f | 0 - 12 | 1 | _timescaledb_internal | _dist_hyper_1_12_chunk | | f | 0 - 13 | 1 | _timescaledb_internal | _dist_hyper_1_13_chunk | | f | 0 - 14 | 1 | _timescaledb_internal | _dist_hyper_1_14_chunk | | f | 0 - 15 | 1 | _timescaledb_internal | _dist_hyper_1_15_chunk | | f | 0 - 16 | 1 | _timescaledb_internal | _dist_hyper_1_16_chunk | | f | 0 - 17 | 1 | _timescaledb_internal | _dist_hyper_1_17_chunk | | f | 0 - 18 | 1 | _timescaledb_internal | _dist_hyper_1_18_chunk | | f | 0 - 19 | 1 | _timescaledb_internal | _dist_hyper_1_19_chunk | | f | 0 + id | hypertable_id | schema_name | table_name | compressed_chunk_id | dropped | status | osm_chunk +----+---------------+-----------------------+------------------------+---------------------+---------+--------+----------- + 1 | 1 | _timescaledb_internal | _dist_hyper_1_1_chunk | | f | 0 | f + 2 | 1 | _timescaledb_internal | _dist_hyper_1_2_chunk | | f | 0 | f + 3 | 1 | _timescaledb_internal | _dist_hyper_1_3_chunk | | f | 0 | f + 4 | 1 | _timescaledb_internal | _dist_hyper_1_4_chunk | | f | 0 | f + 5 | 1 | _timescaledb_internal | _dist_hyper_1_5_chunk | | f | 0 | f + 6 | 1 | _timescaledb_internal | _dist_hyper_1_6_chunk | | f | 0 | f + 7 | 1 | _timescaledb_internal | _dist_hyper_1_7_chunk | | f | 0 | f + 8 | 1 | _timescaledb_internal | _dist_hyper_1_8_chunk | | f | 0 | f + 12 | 1 | _timescaledb_internal | _dist_hyper_1_12_chunk | | f | 0 | f + 13 | 1 | _timescaledb_internal | _dist_hyper_1_13_chunk | | f | 0 | f + 14 | 1 | _timescaledb_internal | _dist_hyper_1_14_chunk | | f | 0 | f + 15 | 1 | _timescaledb_internal | _dist_hyper_1_15_chunk | | f | 0 | f + 16 | 1 | _timescaledb_internal | _dist_hyper_1_16_chunk | | f | 0 | f + 17 | 1 | _timescaledb_internal | _dist_hyper_1_17_chunk | | f | 0 | f + 18 | 1 | _timescaledb_internal | _dist_hyper_1_18_chunk | | f | 0 | f + 19 | 1 | _timescaledb_internal | _dist_hyper_1_19_chunk | | f | 0 | f (16 rows) SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1, 3;