Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Crash in the segmentwise recompression #7748

Open
dbeck opened this issue Feb 19, 2025 · 0 comments
Open

[Bug]: Crash in the segmentwise recompression #7748

dbeck opened this issue Feb 19, 2025 · 0 comments
Assignees
Labels

Comments

@dbeck
Copy link
Contributor

dbeck commented Feb 19, 2025

What type of bug is this?

Crash

What subsystems and features are affected?

Compression

What happened?

Postgres crash when execution the sequence described in the repro.

Happens on version 2.18.1 as of 424642a26ea049a7161f7d1f29d30606860b1e7a

TimescaleDB version affected

2.18.1

PostgreSQL version used

16.7

What operating system did you use?

Ubuntu 22.04.3 LTS x64

What installation method did you use?

Source

What platform did you run on?

On prem/Self-hosted

Relevant log output and stack trace

#0  getmissingattr (tupleDesc=tupleDesc@entry=0x74760db25778, attnum=25964, isnull=isnull@entry=0x7ffcb03ad2a0) at heaptuple.c:167
#1  0x00005f9b775a24e0 in heap_getattr (isnull=0x7ffcb03ad2a0, tupleDesc=0x74760db25778, attnum=<optimised out>, tup=0x7ffcb03ad2b0)
    at ../../../../src/include/access/htup_details.h:802
#2  tuplesort_puttupleslot (state=state@entry=0x5f9b9f8a8d10, slot=slot@entry=0x5f9b9f82d2a0) at tuplesortvariants.c:615
#3  0x000074760db8d10d in recompress_chunk_segmentwise_impl (uncompressed_chunk=uncompressed_chunk@entry=0x5f9b9f85c458)
    at /home/dbeck/work/timescaledb/tsl/src/compression/recompress.c:428
#4  0x000074760db81c6c in tsl_compress_chunk_wrapper (chunk=chunk@entry=0x5f9b9f85c458, if_not_compressed=if_not_compressed@entry=true, recompress=recompress@entry=false)
    at /home/dbeck/work/timescaledb/tsl/src/compression/api.c:971
#5  0x000074760db81d6c in tsl_compress_chunk (fcinfo=<optimised out>) at /home/dbeck/work/timescaledb/tsl/src/compression/api.c:930
#6  0x00005f9b7729c553 in ExecInterpExpr (state=0x5f9b9f851950, econtext=0x5f9b9f84ef00, isnull=<optimised out>) at execExprInterp.c:734
#7  0x00005f9b772ce481 in ExecEvalExprSwitchContext (isNull=0x7ffcb03ad757, econtext=0x5f9b9f84ef00, state=0x5f9b9f851950) at ../../../src/include/executor/executor.h:355
#8  ExecProject (projInfo=0x5f9b9f851948) at ../../../src/include/executor/executor.h:389

How can we reproduce the bug?

set timescaledb.enable_segmentwise_recompression to on;
drop table if exists t;
create table t(ts int, c1 int);
select create_hypertable('t','ts');
alter table t set (timescaledb.compress, timescaledb.compress_segmentby = 'ts');
insert into t (ts,c1) values (6,6);
select compress_chunk(show_chunks('t'));

drop table if exists t;
create table t(ts int, c1 int);
select create_hypertable('t','ts');
alter table t set (timescaledb.compress, timescaledb.compress_segmentby = 'ts');
insert into t (ts,c1) values (6,6);
select compress_chunk(show_chunks('t'));
insert into t (ts,c1) values (7,7);
select compress_chunk(show_chunks('t'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants