pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: exclusion@gmail.com
Subject: BUG #15668: Server crash in transformPartitionRangeBounds
Date: Tue, 05 Mar 2019 09:05:55 +0000
Message-ID: <15668-0377b1981aa1a393@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15668
Logged by:          Alexander Lakhin
Email address:      exclusion@gmail.com
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



view thread (20+ messages)  latest in thread

Message-ID: <15668-0377b1981aa1a393@postgresql.org>
Permalink:  ../15668-0377b1981aa1a393@postgresql.org/
Also on:    postgresql.org/message-id/15668-0377b1981aa1a393@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, exclusion@gmail.com
  Subject: Re: BUG #15668: Server crash in transformPartitionRangeBounds
  In-Reply-To: <15668-0377b1981aa1a393@postgresql.org>
  References: <15668-0377b1981aa1a393@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox