Skip site navigation (1) Skip section navigation (2)

Crash when partition column specified twice

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Crash when partition column specified twice
Date: 2017-04-27 03:36:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Noticed that a crash occurs if a column is specified twice when creating a

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.


Attachment: 0001-Fix-crash-when-partition-column-specified-twice.patch
Description: text/x-diff (8.9 KB)


pgsql-hackers by date

Next:From: Michael PaquierDate: 2017-04-27 04:03:04
Subject: Re: scram and \password
Previous:From: Tom LaneDate: 2017-04-27 03:31:24
Subject: Inefficient shutdown of pg_basebackup

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group