PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15668
PG VersionUnsupported/Unknown
OSUbuntu 18.04
Opened2019-03-05 09:05:55+00
Reported byAlexander Lakhin
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15668
Logged by:          Alexander Lakhin
Email address:      (redacted)
PostgreSQL version: Unsupported/Unknown
Operating system:   Ubuntu 18.04
Description:        

The following query:
CREATE TABLE range_parted (a int) PARTITION BY RANGE (a);
CREATE TABLE rp_part PARTITION OF range_parted FOR VALUES FROM
(unknown.unknown) TO (1);

crashes server (on the master branch) with the stack trace:
Core was generated by `postgres: law regression [local] CREATE TABLE        
                        '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000560ab19ea0bc in transformPartitionRangeBounds
(pstate=pstate@entry=0x560ab3290da8, blist=<optimized out>, 
    parent=parent@entry=0x7f7846a6bea8) at parse_utilcmd.c:3754
3754                            if (strcmp("minvalue", cname) == 0)
(gdb) bt
#0  0x0000560ab19ea0bc in transformPartitionRangeBounds
(pstate=pstate@entry=0x560ab3290da8, blist=<optimized out>, 
    parent=parent@entry=0x7f7846a6bea8) at parse_utilcmd.c:3754
#1  0x0000560ab19eea30 in transformPartitionBound
(pstate=pstate@entry=0x560ab3290da8, 
    parent=parent@entry=0x7f7846a6bea8, spec=0x560ab31fd448) at
parse_utilcmd.c:3706
#2  0x0000560ab1a4436f in DefineRelation (stmt=stmt@entry=0x560ab3295b30,
relkind=relkind@entry=114 'r', ownerId=10, 
    ownerId@entry=0, typaddress=typaddress@entry=0x0, 
    queryString=queryString@entry=0x560ab31da3b0 "CREATE TABLE rp_part
PARTITION OF range_parted FOR VALUES FROM (unknown.unknown) TO (1);") at
tablecmds.c:881
#3  0x0000560ab1bba086 in ProcessUtilitySlow
(pstate=pstate@entry=0x560ab3295a20, pstmt=pstmt@entry=0x560ab31db4b0, 
    queryString=queryString@entry=0x560ab31da3b0 "CREATE TABLE rp_part
PARTITION OF range_parted FOR VALUES FROM (unknown.unknown) TO (1);",
context=context@entry=PROCESS_UTILITY_TOPLEVEL, params=params@entry=0x0, 
    queryEnv=queryEnv@entry=0x0, completionTag=0x7ffcc3c17120 "",
dest=0x560ab31db590) at utility.c:1003
#4  0x0000560ab1bb8b60 in standard_ProcessUtility (pstmt=0x560ab31db4b0, 
    queryString=0x560ab31da3b0 "CREATE TABLE rp_part PARTITION OF
range_parted FOR VALUES FROM (unknown.unknown) TO (1);",
context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0,
dest=0x560ab31db590, completionTag=0x7ffcc3c17120 "")
    at utility.c:923
#5  0x0000560ab1bb6022 in PortalRunUtility (portal=0x560ab32415e0,
pstmt=0x560ab31db4b0, isTopLevel=<optimized out>, 
    setHoldSnapshot=<optimized out>, dest=<optimized out>,
completionTag=0x7ffcc3c17120 "") at pquery.c:1175
#6  0x0000560ab1bb6ae0 in PortalRunMulti
(portal=portal@entry=0x560ab32415e0, isTopLevel=isTopLevel@entry=true, 
    setHoldSnapshot=setHoldSnapshot@entry=false,
dest=dest@entry=0x560ab31db590, altdest=altdest@entry=0x560ab31db590, 
    completionTag=completionTag@entry=0x7ffcc3c17120 "") at pquery.c:1328
#7  0x0000560ab1bb76da in PortalRun (portal=portal@entry=0x560ab32415e0,
count=count@entry=9223372036854775807, 
    isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true,
dest=dest@entry=0x560ab31db590, 
    altdest=altdest@entry=0x560ab31db590, completionTag=0x7ffcc3c17120 "")
at pquery.c:796
#8  0x0000560ab1bb3582 in exec_simple_query (
    query_string=0x560ab31da3b0 "CREATE TABLE rp_part PARTITION OF
range_parted FOR VALUES FROM (unknown.unknown) TO (1);") at
postgres.c:1215
#9  0x0000560ab1bb54ee in PostgresMain (argc=<optimized out>,
argv=argv@entry=0x560ab32056a0, dbname=<optimized out>, 
    username=<optimized out>) at postgres.c:4256
#10 0x0000560ab1b42e00 in BackendRun (port=0x560ab31fdde0,
port=0x560ab31fdde0) at postmaster.c:4382
#11 BackendStartup (port=0x560ab31fdde0) at postmaster.c:4073
#12 ServerLoop () at postmaster.c:1703
#13 0x0000560ab1b43eb9 in PostmasterMain (argc=3, argv=0x560ab31d4a10) at
postmaster.c:1376
#14 0x0000560ab18e33a1 in main (argc=3, argv=0x560ab31d4a10) at main.c:228

Messages

DateAuthorSubject
2019-03-05 09:05:55+00PG Bug reporting formBUG #15668: Server crash in transformPartitionRangeBounds
2019-03-05 14:04:17+00Amit LangoteRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-06 06:48:25+00Michael PaquierRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-06 07:00:42+00Amit LangoteRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-06 08:27:30+00Michael PaquierRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-11 06:44:39+00Amit LangoteRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-11 07:21:14+00Michael PaquierRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-12 15:13:14+00Robert HaasRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-12 16:35:20+00Tom LaneRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-13 04:08:01+00Amit LangoteRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-13 05:15:24+00Amit LangoteRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-13 06:17:47+00Amit LangoteRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-14 04:23:08+00Michael PaquierRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-20 02:07:31+00Michael PaquierRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-20 09:07:23+00Amit LangoteRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-20 09:17:27+00Michael PaquierRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-22 05:09:57+00Michael PaquierRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-22 05:49:42+00Amit LangoteRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-26 01:15:32+00Michael PaquierRe: BUG #15668: Server crash in transformPartitionRangeBounds
2019-03-26 01:24:52+00Amit LangoteRe: BUG #15668: Server crash in transformPartitionRangeBounds