pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: deathlock13@gmail.com, pgsql-bugs@lists.postgresql.org, Andres Freund <andres@anarazel.de>
Subject: Re: BUG #16038: Alter table - SegFault
Date: Fri, 4 Oct 2019 11:43:52 -0300
Message-ID: <20191004144352.GA15934@alvherre.pgsql> (raw)
In-Reply-To: <16038-5c974541f2bf6749@postgresql.org>

On 2019-Oct-04, PG Bug reporting form wrote:

> alter table test.testa
> add column idb numeric(10,0) NOT NULL DEFAULT nextval('test.sq_testb'),
> add column fk_tmpb varchar(20);
> 
> server process (PID 21884) was terminated by signal 11: Segmentation fault
> - empty table - alter goes ok , split alter into 2 add col - works too

Hmm, confirmed, here's the stack trace:

#0  0x0000561459590e9f in heap_compute_data_size (tupleDesc=tupleDesc@entry=0x7faa37b16618, 
    values=values@entry=0x56145b26ba30, isnull=isnull@entry=0x56145b26ba80)
    at /pgsql/source/REL_12_STABLE/src/backend/access/common/heaptuple.c:138
#1  0x000056145959232b in heap_form_tuple (tupleDescriptor=0x7faa37b16618, values=0x56145b26ba30, 
    isnull=0x56145b26ba80) at /pgsql/source/REL_12_STABLE/src/backend/access/common/heaptuple.c:1061
#2  0x000056145975f881 in tts_buffer_heap_materialize (slot=0x56145b26b9c0)
    at /pgsql/source/REL_12_STABLE/src/backend/executor/execTuples.c:713
#3  0x0000561459761083 in ExecFetchSlotHeapTuple (slot=0x56145b26b9c0, materialize=<optimized out>, 
    shouldFree=0x7ffffc491bbf) at /pgsql/source/REL_12_STABLE/src/backend/executor/execTuples.c:1618
#4  0x00005614595e09c4 in heapam_tuple_insert (relation=0x7faa37b159e0, slot=0x56145b26b9c0, cid=8, 
    options=2, bistate=0x56145b26bd68)
    at /pgsql/source/REL_12_STABLE/src/backend/access/heap/heapam_handler.c:250
#5  0x0000561459715614 in table_tuple_insert (bistate=0x56145b26bd68, options=2, cid=8, 
    slot=0x56145b26b9c0, rel=0x7faa37b159e0)
    at /pgsql/source/REL_12_STABLE/src/include/access/tableam.h:1126
#6  ATRewriteTable (tab=tab@entry=0x56145b25b5d8, OIDNewHeap=OIDNewHeap@entry=16396, 
    lockmode=lockmode@entry=8) at /pgsql/source/REL_12_STABLE/src/backend/commands/tablecmds.c:5039
#7  0x000056145972a9b8 in ATRewriteTables (lockmode=8, wqueue=0x7ffffc491d08, 
    parsetree=0x56145b24d7c0) at /pgsql/source/REL_12_STABLE/src/backend/commands/tablecmds.c:4641
#8  ATController (parsetree=parsetree@entry=0x56145b24d7c0, rel=<optimized out>, 
    cmds=<optimized out>, recurse=<optimized out>, lockmode=lockmode@entry=8)
    at /pgsql/source/REL_12_STABLE/src/backend/commands/tablecmds.c:3848

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (4+ messages)  latest in thread

Message-ID: <20191004144352.GA15934@alvherre.pgsql>
Permalink:  ../20191004144352.GA15934@alvherre.pgsql/
Also on:    postgresql.org/message-id/20191004144352.GA15934@alvherre.pgsql

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@2ndquadrant.com, andres@anarazel.de
  Subject: Re: BUG #16038: Alter table - SegFault
  In-Reply-To: <20191004144352.GA15934@alvherre.pgsql>

* 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