[HACKERS] Bug in get_partition_for_tuple

Поиск
Список
Период
Сортировка
От Amit Langote
Тема [HACKERS] Bug in get_partition_for_tuple
Дата
Msg-id d64f8498-70eb-3c88-b56d-c54fd3b0500f@lab.ntt.co.jp
обсуждение исходный текст
Ответы Re: [HACKERS] Bug in get_partition_for_tuple  (Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>)
Список pgsql-hackers
Just observed a crash due to thinko in the logic that handles NULL
partition key.  Absence of null-accepting partition in this case should
have caused an error, instead the current code proceeds with comparison
resulting in crash.

create table p (a int, b char) partition by list (b);
create table p1 partition of p for values in ('a');
insert into p values (1);   -- crashes

Attached patch fixes that and adds a test.

Thanks,
Amit

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] on_dsm_detach() callback and parallel tuplesort BufFile resource management
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] amcheck (B-Tree integrity checking tool)