segfault during SELECT using && ANY (ARRAY[NULL]::BOX2D).

Поиск
Список
Период
Сортировка
От Михаил Денисов
Тема segfault during SELECT using && ANY (ARRAY[NULL]::BOX2D).
Дата
Msg-id CAAYA3GU5_4jufKUGxkTQpS8QvB=0HHP=uJoOUP9wsZVovgkOmg@mail.gmail.com
обсуждение исходный текст
Ответы Re: segfault during SELECT using && ANY (ARRAY[NULL]::BOX2D).  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-bugs
Hello.

i faced with pg crashing  in case of use ANY && statement with array with single null element for field of type BOX2D.

for tests i use postgres+postgis 'as-is' without any tuning after installation by command:
apt-get install postgresql-9.5 postgresql-9.5-postgis-2.2 
(also this error reproduced on production server with pg v11)

error is stable reproduced by following commands:

CREATE DATABASE test_pgcrash;
CREATE EXTENSION postgis;
CREATE TABLE pgcrash (box BOX2D);
INSERT INTO pgcrash (box) values ('BOX(0 0, 1 1)');
SELECT * FROM pgcrash WHERE box && ANY(ARRAY[NULL]::BOX2D[]);

and in postgresql log i see:

2019-06-21 12:45:30 +07 [2268-2] LOG:  server process (PID 2311) was terminated by signal 11: Segmentation fault
2019-06-21 12:45:30 +07 [2268-3] DETAIL:  Failed process was running: CREATE EXTENSION postgis;
        CREATE TABLE pgcrash (box BOX2D);
        INSERT INTO pgcrash (box) values ('BOX(0 0, 1 1)');
        SELECT * FROM pgcrash WHERE box && ANY(ARRAY[NULL]::BOX2D[]);
2019-06-21 12:45:30 +07 [2268-4] LOG:  terminating any other active server processes
2019-06-21 12:45:30 +07 [2275-2] WARNING:  terminating connection because of crash of another server process

thanks,
best regards, mikhail.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Steve Komarov
Дата:
Сообщение: Function pg_database_size fails with "Permission denied" on acorrupted fsm file
Следующее
От: "Rozboril, Robert"
Дата:
Сообщение: RE: PostgreSQL v11.3 - Records are deleted from child table ifpartition key of parent table is changed