-
Notifications
You must be signed in to change notification settings - Fork 848
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]: time_bucket_gapfill
grouped by int[]
field causes database to go into recovery mode
#5981
Labels
Comments
@willsbit Thank you for the bug report. Trivial to reproduce. Stack trace after crash is
|
mkindahl
added a commit
to mkindahl/timescaledb
that referenced
this issue
Aug 21, 2023
The equality comparison function is called using `DirectFunctionCall2Coll`, which do not set the `fcinfo->flinfo` when calling the function. Since `array_eq` uses `fcinfo->flinfo->fn_extra` for caching, and `flinfo` is null, this causes a crash. Fix this issue by using `FunctionCall2Coll` instead, which sets `fcinfo->flinfo` before calling the function. Fixes timescale#5981
mkindahl
added a commit
to mkindahl/timescaledb
that referenced
this issue
Aug 21, 2023
The equality comparison function is called using `DirectFunctionCall2Coll`, which do not set the `fcinfo->flinfo` when calling the function. Since `array_eq` uses `fcinfo->flinfo->fn_extra` for caching, and `flinfo` is null, this causes a crash. Fix this issue by using `FunctionCall2Coll` instead, which sets `fcinfo->flinfo` before calling the function. Fixes timescale#5981
mkindahl
added a commit
to mkindahl/timescaledb
that referenced
this issue
Aug 21, 2023
The equality comparison function is called using `DirectFunctionCall2Coll`, which do not set the `fcinfo->flinfo` when calling the function. Since `array_eq` uses `fcinfo->flinfo->fn_extra` for caching, and `flinfo` is null, this causes a crash. Fix this issue by using `FunctionCall2Coll` instead, which sets `fcinfo->flinfo` before calling the function. Fixes timescale#5981
mkindahl
added a commit
to mkindahl/timescaledb
that referenced
this issue
Aug 21, 2023
The equality comparison function is called using `DirectFunctionCall2Coll`, which do not set the `fcinfo->flinfo` when calling the function. Since `array_eq` uses `fcinfo->flinfo->fn_extra` for caching, and `flinfo` is null, this causes a crash. Fix this issue by using `FunctionCall2Coll` instead, which sets `fcinfo->flinfo` before calling the function. Fixes timescale#5981
mkindahl
added a commit
to mkindahl/timescaledb
that referenced
this issue
Aug 21, 2023
The equality comparison function is called using `DirectFunctionCall2Coll`, which do not set the `fcinfo->flinfo` when calling the PostgreSQL function. Since `array_eq` uses `fcinfo->flinfo->fn_extra` for caching, and `flinfo` is null, this causes a crash. Fix this issue by using `FunctionCall2Coll` instead, which sets `fcinfo->flinfo` before calling the PostgreSQL function. Fixes timescale#5981 Update .unreleased/bugfix_5991 Co-authored-by: Fabrízio de Royes Mello <fabriziomello@gmail.com> Signed-off-by: Mats Kindahl <mats.kindahl@gmail.com>
mkindahl
added a commit
to mkindahl/timescaledb
that referenced
this issue
Aug 22, 2023
The equality comparison function is called using `DirectFunctionCall2Coll`, which do not set the `fcinfo->flinfo` when calling the PostgreSQL function. Since `array_eq` uses `fcinfo->flinfo->fn_extra` for caching, and `flinfo` is null, this causes a crash. Fix this issue by using `FunctionCall2Coll` instead, which sets `fcinfo->flinfo` before calling the PostgreSQL function. Fixes timescale#5981
mkindahl
added a commit
that referenced
this issue
Aug 22, 2023
The equality comparison function is called using `DirectFunctionCall2Coll`, which do not set the `fcinfo->flinfo` when calling the PostgreSQL function. Since `array_eq` uses `fcinfo->flinfo->fn_extra` for caching, and `flinfo` is null, this causes a crash. Fix this issue by using `FunctionCall2Coll` instead, which sets `fcinfo->flinfo` before calling the PostgreSQL function. Fixes #5981
github-actions bot
pushed a commit
that referenced
this issue
Aug 22, 2023
The equality comparison function is called using `DirectFunctionCall2Coll`, which do not set the `fcinfo->flinfo` when calling the PostgreSQL function. Since `array_eq` uses `fcinfo->flinfo->fn_extra` for caching, and `flinfo` is null, this causes a crash. Fix this issue by using `FunctionCall2Coll` instead, which sets `fcinfo->flinfo` before calling the PostgreSQL function. Fixes #5981 (cherry picked from commit 3db6922)
mkindahl
added a commit
that referenced
this issue
Aug 24, 2023
The equality comparison function is called using `DirectFunctionCall2Coll`, which do not set the `fcinfo->flinfo` when calling the PostgreSQL function. Since `array_eq` uses `fcinfo->flinfo->fn_extra` for caching, and `flinfo` is null, this causes a crash. Fix this issue by using `FunctionCall2Coll` instead, which sets `fcinfo->flinfo` before calling the PostgreSQL function. Fixes #5981 (cherry picked from commit 3db6922)
timescale-automation
pushed a commit
that referenced
this issue
Aug 24, 2023
The equality comparison function is called using `DirectFunctionCall2Coll`, which do not set the `fcinfo->flinfo` when calling the PostgreSQL function. Since `array_eq` uses `fcinfo->flinfo->fn_extra` for caching, and `flinfo` is null, this causes a crash. Fix this issue by using `FunctionCall2Coll` instead, which sets `fcinfo->flinfo` before calling the PostgreSQL function. Fixes #5981 (cherry picked from commit 3db6922)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What type of bug is this?
Crash
What subsystems and features are affected?
Gapfill, Query executor, Query planner
What happened?
When using the
time_bucket_gapfill()
function, grouping by anint[]
type column causes a crash.In the example script, simply replacing
int_arr
witharray_to_string(int_arr, ',')
avoids the issue.Expected: the query should work even when grouping by the original array type column.
TimescaleDB version affected
2.10.3
PostgreSQL version used
15.3
What operating system did you use?
(Ubuntu 15.3-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, 64-bit
What installation method did you use?
Docker
What platform did you run on?
On prem/Self-hosted
Relevant log output and stack trace
How can we reproduce the bug?
Minimum reproductible example I set up: SELECT time_bucket_gapfill(5, ts, 1, 1000) as ts, int_arr, locf(last(value, ts)) FROM ( SELECT ARRAY[1,2,3,4]::int[] as int_arr, x as ts, x+500000 as value FROM generate_series(1, 1000, 10) as x ) t GROUP BY 1, 2
The text was updated successfully, but these errors were encountered: