Skip to content

Commit 3b91d6b

Browse files
committed
Add chunks to schema-based publications
Chunks live in _timescaledb_internal, so FOR TABLES IN SCHEMA publications miss them and replication silently skips chunk data. Backfill chunk membership by reading the schema set straight from the CREATE/ALTER PUBLICATION parse tree (no before/after snapshots): - CREATE PUBLICATION is reconciled in the ddl_command_end event trigger (the publication Oid exists by then); add CREATE PUBLICATION to the timescaledb_ddl_command_end WHEN TAG list. - ALTER PUBLICATION ADD/DROP/SET TABLES IN SCHEMA is reconciled in process_ddl_command_start after prev_ProcessUtility. SET rebuilds the full new schema set (PG drops every tracked chunk row on SET); only DROP removes them. Options-only ALTER is a no-op. ALTER TABLE ... SET SCHEMA on a hypertable now reconciles its chunks: remove from the old schema publications, add to the new ones. Runs before ts_hypertable_set_schema flips the catalog schema. Skip adding a redundant explicit pg_publication_rel row when a chunk already lives in a schema this publication covers natively (chunks placed via associated_schema_name); the explicit row would survive a later DROP TABLES IN SCHEMA and orphan. OSM (foreign-table) chunks are skipped throughout; publication_add_relation would fail on them. Tests 6b-6i cover CREATE/ADD/SET/DROP/CURRENT_SCHEMA, schema moves, the redundancy guard (counts of pg_publication_rel rows), options-only ALTER, and GUC-off on the ALTER/schema-change paths. Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
1 parent b33a5e3 commit 3b91d6b

11 files changed

Lines changed: 256 additions & 46 deletions

src/chunk.c

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,15 @@ chunk_add_to_publication(Oid puboid, const Chunk *chunk)
10321032
List *columns = NIL;
10331033
Node *whereClause = NULL;
10341034

1035+
/* publication_add_relation errors on duplicates; the chunk may already be
1036+
* an explicit member (user-added or backfilled by an earlier reconcile). */
1037+
if (SearchSysCacheExists2(PUBLICATIONRELMAP,
1038+
ObjectIdGetDatum(chunk->fd.relid),
1039+
ObjectIdGetDatum(puboid)))
1040+
{
1041+
return;
1042+
}
1043+
10351044
get_hypertable_publication_filters(puboid, chunk, &columns, &whereClause);
10361045

10371046
chunk_rel = table_open(chunk->fd.relid, AccessShareLock);
@@ -1123,6 +1132,21 @@ ts_chunk_publication_reconcile_schema_chunks(Oid pubid, List *schema_oids, bool
11231132
ts_hypertable_cache_get_entry(hcache, lfirst_oid(rc), CACHE_FLAG_MISSING_OK);
11241133
if (ht == NULL)
11251134
{
1135+
/* The scanned schema may hold chunks placed there via
1136+
* associated_schema_name rather than hypertable roots. On DROP such a
1137+
* chunk loses this publication's native schema coverage; if its
1138+
* hypertable's schema is still covered, keep the chunk published with
1139+
* an explicit row (the mirror image of the add-path guard). */
1140+
if (!add)
1141+
{
1142+
Chunk *chunk = ts_chunk_get_by_relid(lfirst_oid(rc), false);
1143+
if (chunk != NULL && list_member_oid(GetSchemaPublications(get_rel_namespace(
1144+
chunk->hypertable_relid)),
1145+
pubid))
1146+
{
1147+
chunk_add_to_publication(pubid, chunk);
1148+
}
1149+
}
11261150
continue;
11271151
}
11281152
ListCell *cc;
@@ -1138,7 +1162,6 @@ ts_chunk_publication_reconcile_schema_chunks(Oid pubid, List *schema_oids, bool
11381162
* Skip adding an explicit row for a chunk that lives in a schema this
11391163
* publication already covers natively: the explicit row would be
11401164
* redundant and would survive a DROP that removes the schema mapping.
1141-
* (Mirrors chunk_add_to_publications' guard.)
11421165
*/
11431166
if (add)
11441167
{

src/chunk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ extern TSDLLEXPORT Datum ts_chunk_status_text(PG_FUNCTION_ARGS);
234234
extern TSDLLEXPORT List *ts_chunk_get_chunk_ids_by_hypertable_id(int32 hypertable_id);
235235
extern TSDLLEXPORT List *ts_chunk_get_by_hypertable_id(int32 hypertable_id);
236236
extern TSDLLEXPORT void ts_chunk_publication_reconcile_schema_chunks(Oid pubid, List *schema_oids,
237-
bool add);
237+
bool add);
238238
extern TSDLLEXPORT void ts_chunk_publication_reconcile_ht_schema_change(int32 hypertable_id,
239239
Oid old_schema,
240240
Oid new_schema);

src/process_utility.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6138,15 +6138,10 @@ publication_schema_oids(List *pubobjects)
61386138
}
61396139

61406140
/*
6141-
* Reconcile chunk membership for the schemas named in a publication command.
6142-
* Chunks live in _timescaledb_internal, so FOR TABLES IN SCHEMA never adds them
6143-
* (PostgreSQL only expands inheritance children for FOR TABLE / FOR ALL
6144-
* TABLES). For SET, PostgreSQL has already dropped every chunk row it
6145-
* tracked, so we rebuild for the full new schema set rather than a difference;
6146-
* only DROP removes chunks, because PostgreSQL leaves our backfilled chunk
6147-
* rows untouched when a schema is dropped from the publication. We read the
6148-
* schema set straight from the parse tree, so only the schemas the command
6149-
* touched are reconciled -- no before/after snapshot is needed.
6141+
* Add or remove chunk rows for the schemas named in this publication command;
6142+
* see ts_chunk_publication_reconcile_schema_chunks for the rationale. For SET,
6143+
* PostgreSQL has already dropped every chunk row it tracked, so we rebuild for
6144+
* the full new schema set rather than a difference; only DROP removes chunks.
61506145
*/
61516146
static void
61526147
reconcile_publication_schemas(const char *pubname, List *schema_oids, bool add)

test/expected/chunk_publication.out

Lines changed: 125 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ INSERT INTO test_hypertable VALUES ('2024-01-01 00:00:00+00', 1, 1.0, 'data1');
401401
-- Create FOR ALL TABLES publication
402402
CREATE PUBLICATION test_pub_all_tables FOR ALL TABLES;
403403
-- Verify initial state (1 chunk)
404-
SELECT schemaname, tablename, attnames, rowfilter FROM pg_publication_tables WHERE pubname = 'test_pub_all_tables' AND tablename LIKE '%test_hypertable%' OR tablename LIKE '_hyper_%' ORDER BY schemaname, tablename;
404+
SELECT schemaname, tablename, attnames, rowfilter FROM pg_publication_tables WHERE pubname = 'test_pub_all_tables' AND (tablename LIKE '%test_hypertable%' OR tablename LIKE '_hyper_%') ORDER BY schemaname, tablename;
405405
schemaname | tablename | attnames | rowfilter
406406
-----------------------+-------------------+------------------------------+-----------
407407
_timescaledb_internal | _hyper_6_41_chunk | {time,device_id,value,extra} |
@@ -411,7 +411,7 @@ SELECT schemaname, tablename, attnames, rowfilter FROM pg_publication_tables WHE
411411
INSERT INTO test_hypertable VALUES ('2024-01-02 00:00:00+00', 2, 2.0, 'data2');
412412
INSERT INTO test_hypertable VALUES ('2024-01-03 00:00:00+00', 3, 3.0, 'data3');
413413
-- Verify state (3 chunks)
414-
SELECT schemaname, tablename, attnames, rowfilter FROM pg_publication_tables WHERE pubname = 'test_pub_all_tables' AND tablename LIKE '%test_hypertable%' OR tablename LIKE '_hyper_%' ORDER BY schemaname, tablename;
414+
SELECT schemaname, tablename, attnames, rowfilter FROM pg_publication_tables WHERE pubname = 'test_pub_all_tables' AND (tablename LIKE '%test_hypertable%' OR tablename LIKE '_hyper_%') ORDER BY schemaname, tablename;
415415
schemaname | tablename | attnames | rowfilter
416416
-----------------------+-------------------+------------------------------+-----------
417417
_timescaledb_internal | _hyper_6_41_chunk | {time,device_id,value,extra} |
@@ -426,7 +426,7 @@ INSERT INTO test_hypertable VALUES ('2024-01-06 00:00:00+00', 6, 6.0, 'data6');
426426
INSERT INTO test_hypertable VALUES ('2024-01-07 00:00:00+00', 7, 7.0, 'data7');
427427
INSERT INTO test_hypertable VALUES ('2024-01-08 00:00:00+00', 8, 8.0, 'data8');
428428
-- Verify final state (8 chunks)
429-
SELECT schemaname, tablename, attnames, rowfilter FROM pg_publication_tables WHERE pubname = 'test_pub_all_tables' AND tablename LIKE '%test_hypertable%' OR tablename LIKE '_hyper_%' ORDER BY schemaname, tablename;
429+
SELECT schemaname, tablename, attnames, rowfilter FROM pg_publication_tables WHERE pubname = 'test_pub_all_tables' AND (tablename LIKE '%test_hypertable%' OR tablename LIKE '_hyper_%') ORDER BY schemaname, tablename;
430430
schemaname | tablename | attnames | rowfilter
431431
-----------------------+-------------------+------------------------------+-----------
432432
_timescaledb_internal | _hyper_6_41_chunk | {time,device_id,value,extra} |
@@ -845,6 +845,101 @@ DROP PUBLICATION test_pub_dst CASCADE;
845845
DROP TABLE ht_dst_schema.test_hypertable CASCADE;
846846
DROP SCHEMA ht_src_schema;
847847
DROP SCHEMA ht_dst_schema;
848+
-- Test 6j: DROP TABLES IN SCHEMA on the chunk-home schema while the
849+
-- hypertable's schema stays published. The chunks were covered natively via
850+
-- their own schema (no explicit rows); dropping that schema from the
851+
-- publication would silently unpublish them, so the reconcile must add
852+
-- explicit rows for chunks whose hypertable schema is still covered.
853+
CREATE SCHEMA ht_root_schema;
854+
CREATE SCHEMA ht_chunk_home;
855+
CREATE TABLE ht_root_schema.test_hypertable (time timestamptz NOT NULL, device_id int, value float);
856+
SELECT create_hypertable('ht_root_schema.test_hypertable', 'time',
857+
chunk_time_interval => interval '1 day',
858+
associated_schema_name => 'ht_chunk_home');
859+
create_hypertable
860+
---------------------------------------
861+
(15,ht_root_schema,test_hypertable,t)
862+
863+
INSERT INTO ht_root_schema.test_hypertable VALUES ('2024-01-01 00:00:00+00', 1, 1.0);
864+
INSERT INTO ht_root_schema.test_hypertable VALUES ('2024-01-02 00:00:00+00', 2, 2.0);
865+
CREATE PUBLICATION test_pub_both FOR TABLES IN SCHEMA ht_root_schema, ht_chunk_home;
866+
-- Chunks are covered natively via ht_chunk_home: no explicit rows.
867+
SELECT count(*) AS explicit_rows FROM pg_publication_rel r
868+
JOIN pg_publication p ON p.oid = r.prpubid WHERE p.pubname = 'test_pub_both';
869+
explicit_rows
870+
---------------
871+
0
872+
873+
-- Drop the chunk-home schema: the hypertable stays published via
874+
-- ht_root_schema, so the chunks get explicit rows to stay published too.
875+
ALTER PUBLICATION test_pub_both DROP TABLES IN SCHEMA ht_chunk_home;
876+
SELECT count(*) AS explicit_rows FROM pg_publication_rel r
877+
JOIN pg_publication p ON p.oid = r.prpubid WHERE p.pubname = 'test_pub_both';
878+
explicit_rows
879+
---------------
880+
2
881+
882+
SELECT schemaname, tablename FROM pg_publication_tables
883+
WHERE pubname = 'test_pub_both' ORDER BY schemaname, tablename;
884+
schemaname | tablename
885+
----------------+--------------------
886+
ht_chunk_home | _hyper_15_68_chunk
887+
ht_chunk_home | _hyper_15_69_chunk
888+
ht_root_schema | test_hypertable
889+
890+
-- A chunk created afterwards converges to the same state (explicit row).
891+
INSERT INTO ht_root_schema.test_hypertable VALUES ('2024-01-03 00:00:00+00', 3, 3.0);
892+
SELECT count(*) AS explicit_rows FROM pg_publication_rel r
893+
JOIN pg_publication p ON p.oid = r.prpubid WHERE p.pubname = 'test_pub_both';
894+
explicit_rows
895+
---------------
896+
3
897+
898+
DROP PUBLICATION test_pub_both CASCADE;
899+
DROP TABLE ht_root_schema.test_hypertable CASCADE;
900+
DROP SCHEMA ht_root_schema;
901+
DROP SCHEMA ht_chunk_home;
902+
-- Test 6k: Documented limitation - with the GUC turned off after chunks were
903+
-- backfilled, DROP TABLES IN SCHEMA skips the reconcile entirely and leaves
904+
-- the explicit chunk rows orphaned (they keep the chunks published). This
905+
-- pins the behavior; see ts_chunk_publication_reconcile_schema_chunks.
906+
CREATE SCHEMA ht_guc_orphan;
907+
CREATE TABLE ht_guc_orphan.test_hypertable (time timestamptz NOT NULL, device_id int, value float);
908+
SELECT create_hypertable('ht_guc_orphan.test_hypertable', 'time', chunk_time_interval => interval '1 day');
909+
create_hypertable
910+
--------------------------------------
911+
(16,ht_guc_orphan,test_hypertable,t)
912+
913+
INSERT INTO ht_guc_orphan.test_hypertable VALUES ('2024-01-01 00:00:00+00', 1, 1.0);
914+
INSERT INTO ht_guc_orphan.test_hypertable VALUES ('2024-01-02 00:00:00+00', 2, 2.0);
915+
CREATE PUBLICATION test_pub_orphan FOR TABLES IN SCHEMA ht_guc_orphan;
916+
SELECT count(*) AS explicit_rows FROM pg_publication_rel r
917+
JOIN pg_publication p ON p.oid = r.prpubid WHERE p.pubname = 'test_pub_orphan';
918+
explicit_rows
919+
---------------
920+
2
921+
922+
-- With the GUC off, the DROP reconcile is skipped: the explicit chunk rows
923+
-- are orphaned and the chunks stay published.
924+
SET timescaledb.enable_chunk_auto_publication = false;
925+
ALTER PUBLICATION test_pub_orphan DROP TABLES IN SCHEMA ht_guc_orphan;
926+
SELECT count(*) AS explicit_rows FROM pg_publication_rel r
927+
JOIN pg_publication p ON p.oid = r.prpubid WHERE p.pubname = 'test_pub_orphan';
928+
explicit_rows
929+
---------------
930+
2
931+
932+
SELECT schemaname, tablename FROM pg_publication_tables
933+
WHERE pubname = 'test_pub_orphan' ORDER BY schemaname, tablename;
934+
schemaname | tablename
935+
-----------------------+--------------------
936+
_timescaledb_internal | _hyper_16_71_chunk
937+
_timescaledb_internal | _hyper_16_72_chunk
938+
939+
SET timescaledb.enable_chunk_auto_publication = true;
940+
DROP PUBLICATION test_pub_orphan CASCADE;
941+
DROP TABLE ht_guc_orphan.test_hypertable CASCADE;
942+
DROP SCHEMA ht_guc_orphan;
848943
-- Test 6i: GUC off suppresses reconciliation on the ALTER PUBLICATION and
849944
-- schema-change paths (not only on the per-chunk create hook tested in Test 9).
850945
SET timescaledb.enable_chunk_auto_publication = false;
@@ -854,7 +949,7 @@ CREATE TABLE ht_guc_schema.test_hypertable (time timestamptz NOT NULL, device_id
854949
SELECT create_hypertable('ht_guc_schema.test_hypertable', 'time', chunk_time_interval => interval '1 day');
855950
create_hypertable
856951
--------------------------------------
857-
(15,ht_guc_schema,test_hypertable,t)
952+
(17,ht_guc_schema,test_hypertable,t)
858953

859954
INSERT INTO ht_guc_schema.test_hypertable VALUES ('2024-01-01 00:00:00+00', 1, 1.0);
860955
INSERT INTO ht_guc_schema.test_hypertable VALUES ('2024-01-02 00:00:00+00', 2, 2.0);
@@ -870,7 +965,7 @@ CREATE TABLE ht_guc_schema2.test_hypertable2 (time timestamptz NOT NULL, device_
870965
SELECT create_hypertable('ht_guc_schema2.test_hypertable2', 'time', chunk_time_interval => interval '1 day');
871966
create_hypertable
872967
----------------------------------------
873-
(16,ht_guc_schema2,test_hypertable2,t)
968+
(18,ht_guc_schema2,test_hypertable2,t)
874969

875970
INSERT INTO ht_guc_schema2.test_hypertable2 VALUES ('2024-02-01 00:00:00+00', 1, 1.0);
876971
INSERT INTO ht_guc_schema2.test_hypertable2 VALUES ('2024-02-02 00:00:00+00', 2, 2.0);
@@ -897,10 +992,10 @@ ALTER PUBLICATION test_pub_guc SET TABLES IN SCHEMA ht_guc_schema, ht_guc_schema
897992
SELECT schemaname, tablename FROM pg_publication_tables WHERE pubname = 'test_pub_guc' ORDER BY schemaname, tablename;
898993
schemaname | tablename
899994
-----------------------+--------------------
900-
_timescaledb_internal | _hyper_15_68_chunk
901-
_timescaledb_internal | _hyper_15_69_chunk
902-
_timescaledb_internal | _hyper_16_70_chunk
903-
_timescaledb_internal | _hyper_16_71_chunk
995+
_timescaledb_internal | _hyper_17_73_chunk
996+
_timescaledb_internal | _hyper_17_74_chunk
997+
_timescaledb_internal | _hyper_18_75_chunk
998+
_timescaledb_internal | _hyper_18_76_chunk
904999
ht_guc_schema2 | test_hypertable
9051000
ht_guc_schema2 | test_hypertable2
9061001

@@ -914,7 +1009,7 @@ CREATE TABLE test_hypertable (time timestamptz NOT NULL, device_id int, value fl
9141009
SELECT create_hypertable('test_hypertable', 'time', chunk_time_interval => interval '1 day');
9151010
create_hypertable
9161011
-------------------------------
917-
(17,public,test_hypertable,t)
1012+
(19,public,test_hypertable,t)
9181013

9191014
-- Insert to create 8 chunks without any publication
9201015
INSERT INTO test_hypertable VALUES ('2024-01-01 00:00:00+00', 1, 1.0, 'data1');
@@ -939,7 +1034,7 @@ CREATE TABLE test_hypertable (time timestamptz NOT NULL, device_id int, value fl
9391034
SELECT create_hypertable('test_hypertable', 'time', chunk_time_interval => interval '1 day');
9401035
create_hypertable
9411036
-------------------------------
942-
(18,public,test_hypertable,t)
1037+
(20,public,test_hypertable,t)
9431038

9441039
-- Insert to create first chunk
9451040
INSERT INTO test_hypertable VALUES ('2024-01-01 00:00:00+00', 1, 1.0, 'data1');
@@ -949,7 +1044,7 @@ CREATE PUBLICATION test_pub FOR TABLE test_hypertable;
9491044
SELECT schemaname, tablename, attnames, rowfilter FROM pg_publication_tables WHERE pubname = 'test_pub' ORDER BY schemaname, tablename;
9501045
schemaname | tablename | attnames | rowfilter
9511046
-----------------------+--------------------+------------------------------+-----------
952-
_timescaledb_internal | _hyper_18_80_chunk | {time,device_id,value,extra} |
1047+
_timescaledb_internal | _hyper_20_85_chunk | {time,device_id,value,extra} |
9531048
public | test_hypertable | {time,device_id,value,extra} |
9541049

9551050
-- Drop the publication
@@ -972,7 +1067,7 @@ CREATE TABLE test_hypertable (time timestamptz NOT NULL, device_id int, value fl
9721067
SELECT create_hypertable('test_hypertable', 'time', chunk_time_interval => interval '1 day');
9731068
create_hypertable
9741069
-------------------------------
975-
(19,public,test_hypertable,t)
1070+
(21,public,test_hypertable,t)
9761071

9771072
-- Insert to create first chunk
9781073
INSERT INTO test_hypertable VALUES ('2024-01-01 00:00:00+00', 1, 1.0, 'data1');
@@ -982,7 +1077,7 @@ CREATE PUBLICATION test_pub_guc FOR TABLE test_hypertable;
9821077
SELECT schemaname, tablename FROM pg_publication_tables WHERE pubname = 'test_pub_guc' ORDER BY schemaname, tablename;
9831078
schemaname | tablename
9841079
-----------------------+--------------------
985-
_timescaledb_internal | _hyper_19_83_chunk
1080+
_timescaledb_internal | _hyper_21_88_chunk
9861081
public | test_hypertable
9871082

9881083
-- Test Part 1: GUC enabled - chunks should be added to publication automatically
@@ -992,8 +1087,8 @@ INSERT INTO test_hypertable VALUES ('2024-01-02 00:00:00+00', 2, 2.0, 'data2');
9921087
SELECT schemaname, tablename FROM pg_publication_tables WHERE pubname = 'test_pub_guc' ORDER BY schemaname, tablename;
9931088
schemaname | tablename
9941089
-----------------------+--------------------
995-
_timescaledb_internal | _hyper_19_83_chunk
996-
_timescaledb_internal | _hyper_19_84_chunk
1090+
_timescaledb_internal | _hyper_21_88_chunk
1091+
_timescaledb_internal | _hyper_21_89_chunk
9971092
public | test_hypertable
9981093

9991094
-- Test Part 2: Disable the GUC and create another chunk
@@ -1004,17 +1099,17 @@ INSERT INTO test_hypertable VALUES ('2024-01-03 00:00:00+00', 3, 3.0, 'data3');
10041099
SELECT schemaname, tablename FROM pg_publication_tables WHERE pubname = 'test_pub_guc' ORDER BY schemaname, tablename;
10051100
schemaname | tablename
10061101
-----------------------+--------------------
1007-
_timescaledb_internal | _hyper_19_83_chunk
1008-
_timescaledb_internal | _hyper_19_84_chunk
1102+
_timescaledb_internal | _hyper_21_88_chunk
1103+
_timescaledb_internal | _hyper_21_89_chunk
10091104
public | test_hypertable
10101105

10111106
-- Verify that chunk 3 exists but is not in the publication
1012-
SELECT chunk_schema, chunk_name FROM timescaledb_information.chunks WHERE hypertable_name = 'test_hypertable';
1107+
SELECT chunk_schema, chunk_name FROM timescaledb_information.chunks WHERE hypertable_name = 'test_hypertable' ORDER BY chunk_name;
10131108
chunk_schema | chunk_name
10141109
-----------------------+--------------------
1015-
_timescaledb_internal | _hyper_19_83_chunk
1016-
_timescaledb_internal | _hyper_19_84_chunk
1017-
_timescaledb_internal | _hyper_19_85_chunk
1110+
_timescaledb_internal | _hyper_21_88_chunk
1111+
_timescaledb_internal | _hyper_21_89_chunk
1112+
_timescaledb_internal | _hyper_21_90_chunk
10181113

10191114
-- Test Part 3: Re-enable the GUC and create another chunk
10201115
SET timescaledb.enable_chunk_auto_publication = true;
@@ -1024,18 +1119,18 @@ INSERT INTO test_hypertable VALUES ('2024-01-04 00:00:00+00', 4, 4.0, 'data4');
10241119
SELECT schemaname, tablename FROM pg_publication_tables WHERE pubname = 'test_pub_guc' ORDER BY schemaname, tablename;
10251120
schemaname | tablename
10261121
-----------------------+--------------------
1027-
_timescaledb_internal | _hyper_19_83_chunk
1028-
_timescaledb_internal | _hyper_19_84_chunk
1029-
_timescaledb_internal | _hyper_19_86_chunk
1122+
_timescaledb_internal | _hyper_21_88_chunk
1123+
_timescaledb_internal | _hyper_21_89_chunk
1124+
_timescaledb_internal | _hyper_21_91_chunk
10301125
public | test_hypertable
10311126

1032-
SELECT chunk_schema, chunk_name FROM timescaledb_information.chunks WHERE hypertable_name = 'test_hypertable';
1127+
SELECT chunk_schema, chunk_name FROM timescaledb_information.chunks WHERE hypertable_name = 'test_hypertable' ORDER BY chunk_name;
10331128
chunk_schema | chunk_name
10341129
-----------------------+--------------------
1035-
_timescaledb_internal | _hyper_19_83_chunk
1036-
_timescaledb_internal | _hyper_19_84_chunk
1037-
_timescaledb_internal | _hyper_19_85_chunk
1038-
_timescaledb_internal | _hyper_19_86_chunk
1130+
_timescaledb_internal | _hyper_21_88_chunk
1131+
_timescaledb_internal | _hyper_21_89_chunk
1132+
_timescaledb_internal | _hyper_21_90_chunk
1133+
_timescaledb_internal | _hyper_21_91_chunk
10391134

10401135
-- Cleanup
10411136
DROP PUBLICATION test_pub_guc CASCADE;

0 commit comments

Comments
 (0)