Quantcast
Channel: TimescaleDB and PostgreSQL - Timescale Community Forum
Viewing all articles
Browse latest Browse all 291

"Aggregated Compressed Column Not Found" Error on Single id_number Aggregation Query in TimescaleDB

$
0
0

We’re experiencing an intermittent issue with aggregation queries on compressed data in TimescaleDB (versions 2.16 and 2.17). Specifically, when querying a single id_number from a compressed hypertable and selecting a time period for more than a week, we encounter an error. However, this error does not occur when the query includes multiple id_number values. We have two seemingly identical environments, but only one of them exhibits this behavior.

Error Message:
ERROR: aggregated compressed column not found
DETAIL: Assertion ‘value_column_description != NULL’ failed.

Environment Details:

  • Operating System: Ubuntu 22.04
  • PostgreSQL Version: 16.4
  • TimescaleDB Version: Tested on 2.16 and 2.17

Steps to Reproduce:

  1. Set up compressed hypertable:
  • Create a hypertable (e.g., data_5min) with compression enabled.
  • Insert sample data and ensure the table has multiple chunks.
  1. Run Query:
  • Single ID (FAILS)
SELECT 
    id_number AS idNumber,
    AVG("value") AS "value",
    time_bucket('6 hour', ts) AS timeBucket
FROM 
    data_5min
WHERE 
    id_number IN (10) 
    AND ts >= '2024-10-15 00:00:00' 
    AND ts < '2024-10-27 00:00:00'
GROUP BY 
    id_number, timeBucket
ORDER BY 
    timeBucket;
  • Multiple ID (WORKS)
SELECT 
    id_number AS idNumber,
    AVG("value") AS "value",
    time_bucket('6 hour', ts) AS timeBucket
FROM 
    data_5min
WHERE 
    id_number IN (10, 20) 
    AND ts >= '2024-10-15 00:00:00' 
    AND ts < '2024-10-27 00:00:00'
GROUP BY 
    id_number, timeBucket
ORDER BY 
    timeBucket;

Additional Information:
This error does not appear in an identical environment running TimescaleDB 2.16.
Verified that compression was enabled and checked chunk statuses.

Expected Behavior:
The query with a single id_number should execute without errors, as it does when querying with multiple IDs.

9 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 291

Trending Articles