skip to Main Content

PostgreSQL: get latest row for each time interval

I have the following table. It is stored as a TimescaleDB hypertable. Data rate is 1 row per second. CREATE TABLE electricity_data ( "time" timestamptz NOT NULL, meter_id integer REFERENCES meters NOT NULL, import_low double precision, import_normal double precision, export_low…

VIEW QUESTION

force restart postgresql docker – Ubuntu

I have a script trying to restart postgresql docker container: DOCKER_CONTAINER_NAME="timescaledb" docker restart -t 1 $DOCKER_CONTAINER_NAME timeout 9000000s bash -c "until docker exec $DOCKER_CONTAINER_NAME pg_isready ; do sleep 1 ; done" However, this line (with any -t number) docker restart…

VIEW QUESTION
Back To Top
Search