[Bug]: compress_chunk fails with "row is too big" when orderby text columns hold wide values
Author: cevianCreated Sep 28, 2026Updated Sep 28, 2026
Labelsbugneeds-triagev2.31.0
What type of bug is this?
Unexpected error
What subsystems and features are affected?
Compression
What happened?
Compressing a chunk of a hypertable whose orderby includes two text columns holding
values of about 2 KB fails with row is too big: size 8216, maximum size 8160
(SQLSTATE 54000). I think can also be found with one column if big enough.
TimescaleDB version affected
2.31.0-dev, built from main at 8ffe9536a
PostgreSQL version used
17.2
What operating system did you use?
macOS 14 (Darwin 23.3.0) arm64
What installation method did you use?
Source
What platform did you run on?
On prem/Self-hosted
Relevant log output and stack trace
How can we reproduce the bug?
CREATE TABLE t (ts timestamptz NOT NULL, a text NOT NULL, b text NOT NULL, seg int);
SELECT create_hypertable('t', 'ts');
ALTER TABLE t SET (timescaledb.compress, timescaledb.compress_segmentby = 'seg',
timescaledb.compress_orderby = 'a, b DESC, ts');
INSERT INTO t SELECT '2024-01-01'::timestamptz + i * interval '1 minute',
repeat('x', 2000), repeat('x', 2000), i % 3
FROM generate_series(1, 50) i;
SELECT compress_chunk(c) FROM show_chunks('t') c;
-- ERROR: row is too big: size 8216, maximum size 8160Source: timescale/timescaledb