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
EXPLAIN of UPDATE of compressed hypertable fails with bogus varno
BEGIN; EXPLAIN (analyze,costs off,timing off,summary off) UPDATE decompress_tracking SET value = value + 3 WHERE device = 'd1'; ROLLBACK;
BEGIN
Time: 1.739 ms
ERROR: XX000: bogus varno: -3
LOCATION: resolve_special_varno, ruleutils.c:7619
To reproduce:
CREATE TABLE decompress_tracking(time timestamptz not null, device text, value float);
SELECT table_name FROM create_hypertable('decompress_tracking','time');
ALTER TABLE decompress_tracking SET (timescaledb.compress, timescaledb.compress_segmentby='device');
INSERT INTO decompress_tracking SELECT '2020-01-01', 'd1', random() FROM generate_series(1,10);
INSERT INTO decompress_tracking SELECT '2020-01-01', 'd2', random() FROM generate_series(1,20);
INSERT INTO decompress_tracking SELECT '2020-01-01', 'd3', random() FROM generate_series(1,30);
SELECT count(compress_chunk(ch)) FROM show_chunks('decompress_tracking') ch;
BEGIN; UPDATE decompress_tracking SET value = value + 3 WHERE device = 'd1'; ROLLBACK; -- (or commit, doesn't make a difference)
BEGIN; EXPLAIN (analyze,costs off,timing off,summary off) UPDATE decompress_tracking SET value = value + 3 WHERE device = 'd1'; ROLLBACK;
The text was updated successfully, but these errors were encountered:
In the case of the explain plan, I think the issue is the fact that the plan we get from ExecInitNode/decompress_chunk_walker is a seqscan. Thus, in set_deparse_plan, dpns->index_tlist is set to NULL, but later in resolve_special_varno, we have var->varno == INDEX_VAR (because we have set it so in fix_index_qual) and yet dpns->index_tlist is NULL.
These observations make me think the issue is limited to the EXPLAIN, but given SDC#1350 https://github.com/timescale/Support-Dev-Collab/issues/1350, I am not so sure
EXPLAIN of UPDATE of compressed hypertable fails with
bogus varno
To reproduce:
The text was updated successfully, but these errors were encountered: