From d04d86a1e13bd8b47714ff5280165974b9628633 Mon Sep 17 00:00:00 2001 From: Pieter Hollander Date: Wed, 20 Mar 2024 00:42:34 +0100 Subject: [PATCH] Update doc. Fix TimescaleDB integration. --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index f4713ce..2c7a5b5 100644 --- a/main.go +++ b/main.go @@ -48,8 +48,9 @@ import ( // meaning even more storage capacity is saved: // 10.52 / 10 * 9 = 9,468 MB. // -// For D, R, D1-3 and R1-3, either D or R will be active. -// Therefore, their storage requirements can be sliced in half, saving 4 * 10.52 = 42.08 MB +// For D1-3 and R1-3, either Dx or Rx will be active. +// Therefore, their storage requirements can be sliced in half, saving 3 * 10.52 = 42.08 MB +// This is different for D and R, as these contain the sum of each phase and are reported simultaneously. // // Not saving failures when there is no change, will save around 10.52MB per month per metric, so an additional 21.04MB // Theoretical storage requirements for a DSMR5 meter with metrics emitted every second: @@ -432,11 +433,10 @@ func connectToPostgreSQL(pgConnStr string) error { if timescaleDBEnabled == "true" { // Enable TimescaleDB _, err = db.Exec(` - CREATE EXTENSION IF NOT EXISTS timescaledb; SELECT create_hypertable('p1', 'timestamp', if_not_exists => TRUE, migrate_data => TRUE); `) if err != nil { - log.Fatal("Error creating TimescaleDB extension:", err) + log.Fatal("Error creating TimescaleDB hypertable:", err) } }