[HACKERS] Crash when partition column specified twice

Поиск
Список
Период
Сортировка
От Amit Langote
Тема [HACKERS] Crash when partition column specified twice
Дата
Msg-id 6ed23d3d-c09d-4cbc-3628-0a8a32f750f4@lab.ntt.co.jp
обсуждение исходный текст
Ответы Re: [HACKERS] Crash when partition column specified twice  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
Noticed that a crash occurs if a column is specified twice when creating a
partition:

create table p (a int) partition by list (a);

-- crashes
create table p1 partition of parent (
  a not null,
  a default 1
) for values in (1);

The logic in MergeAttributes() that merged partition column options with
those of the parent didn't properly check for column being specified twice
and instead tried to delete the same ColumnDef from a list twice, causing
the crash.

Attached fixes that.

Added to the open items list.

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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: [HACKERS] Inefficient shutdown of pg_basebackup
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] scram and \password