Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/create
diff options
context:
space:
mode:
authorDmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com>2022-06-30 11:41:37 +0300
committerDmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com>2022-06-30 11:41:37 +0300
commit20e3fc3b5880a76277e23cb96214dba00e9e711a (patch)
tree90a646007868003cbd7b7bc2d08392223bfc3dc8 /create
parenteee47baebc1fe1ceead73b85fd3aa9675fa6ce0b (diff)
.......... [DEV-2097] tsdb - added update of config.compression_status
Diffstat (limited to 'create')
-rwxr-xr-xcreate/bin/gen_history_pk.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/create/bin/gen_history_pk.pl b/create/bin/gen_history_pk.pl
index b6ff164d43c..d6fa8bb4ea3 100755
--- a/create/bin/gen_history_pk.pl
+++ b/create/bin/gen_history_pk.pl
@@ -190,6 +190,7 @@ SELECT create_hypertable('%HISTTBL', 'clock', chunk_time_interval => (
INSERT INTO %HISTTBL SELECT * FROM temp_%HISTTBL ON CONFLICT (itemid,clock,ns) DO NOTHING;
%COMPRESS
+%CONFIG_COMPR
HEREDOC
;
@@ -226,10 +227,12 @@ sub output_tsdb {
if (not(defined $tsdb_compression))
{
$tsdb_out =~ s/%COMPRESS//g;
+ $tsdb_out =~ s/%CONFIG_COMPR/UPDATE config SET compression_status=0;/g;
}
elsif ($tsdb_compression eq 'with_compression')
{
$tsdb_out =~ s/%COMPRESS/$tsdb_compress_sql/g;
+ $tsdb_out =~ s/%CONFIG_COMPR/UPDATE config SET compression_status=1;/g;
}
my $temp_ddl = $postgresql{$tbl};