You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Materialization of decompressed tuples using "CREATE TABLE AS" causes memory corruption Β #10585
Looks like handling of decompressed text columns (most likely dictionary compression) can produce corrupt materialized tuples. No issues with simple SELECT but when combined with CTAS, we get data corruption.
CREATE TABLE repro_src(ts timestamptz NOT NULL, txt text, seg text);
SELECT create_hypertable('repro_src', by_range('ts'));
ALTER TABLE repro_src SET (timescaledb.compress,
timescaledb.compress_segmentby = 'seg',
timescaledb.compress_orderby = 'ts');
INSERT INTO repro_src VALUES
('2024-01-01 00:00:01+00', 'a', 'segvalue'),
('2024-01-01 00:00:02+00', 'abcdefgh', 'segvalue');
SELECT compress_chunk(c) FROM show_chunks('repro_src') c;
SELECT txt, seg FROM repro_src ORDER BY ts; -- both rows: segvalue
CREATE TEMP TABLE dst AS SELECT * FROM repro_src;
SELECT txt, seg FROM dst ORDER BY ts; -- row 2 seg: fghsegvalue~\x7F\x7F...
changed the title [-]Materialization of decompressed tuples causes memory corruption[/-][+]Materialization of decompressed tuples using CTAS causes memory corruption [/+]on Sep 11, 2026
changed the title [-]Materialization of decompressed tuples using CTAS causes memory corruption [/-][+]Materialization of decompressed tuples using "CREATE TABLE AS" causes memory corruption [/+]on Sep 11, 2026
Activity
[-]Materialization of decompressed tuples causes memory corruption[/-][+]Materialization of decompressed tuples using CTAS causes memory corruption [/+][-]Materialization of decompressed tuples using CTAS causes memory corruption [/-][+]Materialization of decompressed tuples using "CREATE TABLE AS" causes memory corruption [/+]dbeck commentedon Sep 28, 2026
@akuzm : I have a fix for this, happy to send it for PR unless you already started working on it
akuzm commentedon Sep 28, 2026
@dbeck I have this thing: #10657 I wanted to add some tests and publish it for review.
Release 2.30.2