From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | bernddorn(at)gmail(dot)com |
Subject: | BUG #17227: segmentation fault with jsonb_to_recordset |
Date: | 2021-10-13 09:16:08 |
Message-ID: | 17227-5a28ed1512189fa4@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 17227
Logged by: Bernd Dorn
Email address: bernddorn(at)gmail(dot)com
PostgreSQL version: 14.0
Operating system: docker postgres:14 on osx
Description:
to reproduce :
```
docker run --name pg -p 5432:5432 --rm -e POSTGRES_PASSWORD=pw postgres:14
docker exec -ti pg psql --user postgres
```
run this query:
```
select *
from (
select jsonb_path_query_array(module -> 'lectures', '$[*]') as
lecture
from unnest(
array[$${
"lectures": [
{
"id": "1"
}
]
}$$::jsonb]) as unnested_modules(module)
) as l,
jsonb_to_recordset(l.lecture) as (id text)
limit 1;
```
output in logs:
```
2021-10-13 09:07:58.073 UTC [1] LOG: server process (PID 83) was terminated
by signal 11: Segmentation fault
2021-10-13 09:07:58.073 UTC [1] DETAIL: Failed process was running: select
*
from (
select jsonb_path_query_array(module -> 'lectures', '$[*]') as
lecture
from unnest(
array[$${
"lectures": [
{
"id": "1"
}
]
}$$::jsonb]) as unnested_modules(module)
) as l,
jsonb_to_recordset(l.lecture) as (id text)
limit 1;
2021-10-13 09:07:58.073 UTC [1] LOG: terminating any other active server
processes
2021-10-13 09:07:58.074 UTC [84] FATAL: the database system is in recovery
mode
2021-10-13 09:07:58.076 UTC [1] LOG: all server processes terminated;
reinitializing
2021-10-13 09:07:58.089 UTC [85] LOG: database system was interrupted; last
known up at 2021-10-13 09:07:34 UTC
2021-10-13 09:07:58.180 UTC [85] LOG: database system was not properly shut
down; automatic recovery in progress
2021-10-13 09:07:58.182 UTC [85] LOG: redo starts at 0/16FAB48
2021-10-13 09:07:58.182 UTC [85] LOG: invalid record length at 0/16FAB80:
wanted 24, got 0
2021-10-13 09:07:58.182 UTC [85] LOG: redo done at 0/16FAB48 system usage:
CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2021-10-13 09:07:58.192 UTC [1] LOG: database system is ready to accept
connections
```
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2021-10-13 13:11:15 | BUG #17228: Adding 'syslog' to log_destination causes postgres service throw an error when restarted. |
Previous Message | Dilip Kumar | 2021-10-13 08:29:51 | Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable |