mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 02:23:49 +08:00
Add osm_chunk field to chunk catalog table
Setting this field to true indicates that this is an OSM chunk.
This commit is contained in:
parent
8f920b393a
commit
847919a05f
@ -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', '');
|
||||
|
14
src/chunk.c
14
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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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] = {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 --
|
||||
|
@ -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;
|
||||
|
@ -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 --
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user