mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 19:13:16 +08:00
parent
0641f9dba2
commit
f30d15a997
@ -118,6 +118,15 @@ policy_compression_add(PG_FUNCTION_ARGS)
|
||||
|
||||
/* check if this is a table with compression enabled */
|
||||
hypertable = ts_hypertable_cache_get_cache_and_entry(ht_oid, CACHE_FLAG_NONE, &hcache);
|
||||
|
||||
if (hypertable_is_distributed(hypertable))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("add_compression_policy not implemented for distributed hypertable"),
|
||||
errdetail(
|
||||
"Current version doesn't implement support for add_compression_policy() on "
|
||||
"distributed hypertables.")));
|
||||
|
||||
if (!TS_HYPERTABLE_HAS_COMPRESSION(hypertable))
|
||||
{
|
||||
ts_cache_release(hcache);
|
||||
|
@ -319,3 +319,9 @@ SELECT * FROM hypertable_detailed_size('compressed'::regclass) ORDER BY node_nam
|
||||
16384 | 65536 | 0 | 81920 | db_dist_compression_3
|
||||
(3 rows)
|
||||
|
||||
-- Test compression policy with distributed hypertable
|
||||
--
|
||||
\set ON_ERROR_STOP 0
|
||||
SELECT add_compression_policy('compressed', '60d'::interval);
|
||||
ERROR: add_compression_policy not implemented for distributed hypertable
|
||||
\set ON_ERROR_STOP 1
|
||||
|
@ -100,3 +100,8 @@ SELECT * FROM chunks_detailed_size('compressed'::regclass)
|
||||
ORDER BY chunk_name, node_name;
|
||||
SELECT * FROM hypertable_detailed_size('compressed'::regclass) ORDER BY node_name;
|
||||
|
||||
-- Test compression policy with distributed hypertable
|
||||
--
|
||||
\set ON_ERROR_STOP 0
|
||||
SELECT add_compression_policy('compressed', '60d'::interval);
|
||||
\set ON_ERROR_STOP 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user