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]: SQL Error [XX000]: ERROR: child rel 1 not found in append_rel_array #6140

Open
msuluhan opened this issue Oct 2, 2023 · 1 comment

Comments

@msuluhan
Copy link

msuluhan commented Oct 2, 2023

What type of bug is this?

Unexpected error

What subsystems and features are affected?

Other

What happened?

Hello

We have a strange issue with timescaledb.
When we run queries with time based columns we get following error
SQL Error [XX000]: ERROR: child rel 1 not found in append_rel_array
Example query like in following lines

SELECT
point, created_at at time zone 'utc' at time zone 'UTC'
FROM
 "interval" i
 --_timescaledb_internal._hyper_1_158_chunk
WHERE point = ANY('{3c7fe982-c16b-11ec-8efb-9d194ef1f1a7}')
and created_at >= '2023-06-15' and created_at < '2023-06-17'

There is no problem with columns other than time based
We just installed this system, upgraded and then rebooted before timescaledb install so it is quiet up2date
We also tried decompress and then compress chunk and also tried again but no progress.
We are also discussing to downgrade timescaledb version
Version informations about components in following lines

PostgreSQL 15.4 (Ubuntu 15.4-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
timescaledb version :  2.11.2 
Linux kernel : 5.15.0-83-generic
Ubuntu  release :Ubuntu 22.04.3 LTS

What we tried about error
--> decompressed and compressed data, tried again, no positive progress
--> updated all the components with apt-get update, apt-get upgrade, apt-get dist-upgrade and then rebooted the system, tested again no positive progress
--> installed new system with same versions, copied data to new system tested again, got same error again with different chunks but no error with same chunk in old system
--> installed 2.11.1 version of timescaledb and same error occured

If you need any other log/output etc, please let me know

Thanks
msuluhan

TimescaleDB version affected

2.11.2

PostgreSQL version used

15.4

What operating system did you use?

Ubuntu 22.04.3 LTS

What installation method did you use?

Deb/Apt

What platform did you run on?

On prem/Self-hosted

Relevant log output and stack trace

No response

How can we reproduce the bug?

CREATE TABLE public."interval" (
	point uuid NOT NULL,
	created_at timestamp NOT NULL,
	value numeric(18, 6) NOT NULL,
	inserted_at timestamp NULL,
	quality int2 NULL
);
CREATE UNIQUE INDEX interval_point_created_at_idx ON public."interval" USING btree (point, created_at DESC);
-- Create hypertable with daily chunks
SELECT create_hypertable('interval', 'created_at', chunk_time_interval => INTERVAL '1 day');
ALTER TABLE interval SET (timescaledb.compress,  timescaledb.compress_segmentby = 'point');
-- Add compression policy
SELECT add_compression_policy('interval', INTERVAL '30d');


If you insert above table and then run the query like, you might see same error

SELECT
point, created_at at time zone 'utc' at time zone 'UTC'
FROM
 "interval" i
 --_timescaledb_internal._hyper_1_158_chunk
WHERE point = ANY('{3c7fe982-c16b-11ec-8efb-9d194ef1f1a7}')
and created_at >= '2023-06-15' and created_at < '2023-06-17'
@msuluhan msuluhan added the bug label Oct 2, 2023
@antekresic
Copy link
Contributor

Hi there.

Thanks for reporting this issue. I've been trying to replicate it but without much luck.

Could you increase the verbosity in psql and try to get the error? The output could help us get to the bottom of this.

postgres=# \set VERBOSITY verbose

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants