BUG #2826: Segfault on prepared statement after changing column type

From: "" <martin(dot)pihlak(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2826: Segfault on prepared statement after changing column type
Date: 2006-12-14 22:07:36
Message-ID: 200612142207.kBEM7avW096546@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2826
Logged by:
Email address: martin(dot)pihlak(at)gmail(dot)com
PostgreSQL version: 8.2.0, older
Operating system: Ubuntu 6.10 2.6.17-10-386, libc6 2.4-1ubuntu12
Description: Segfault on prepared statement after changing column
type
Details:

The following sequence of statements cause a segfault
on 8.2.0:

create table test (i integer);
create index test_idx on test(i);
prepare c as insert into test values (1);
alter table test alter i type bigint;
execute c;

Also crashes 8.1.4 and 8.0.6, although a bit harder to
achieve on the latter. Seems to work fine if the column
being changed is not indexed.

backtrace from core file:

(gdb) bt
#0 0xb7e3337c in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1 0x0807bc90 in heap_fill_tuple ()
#2 0x0807cfb4 in index_form_tuple ()
#3 0x0809bba0 in btinsert ()
#4 0x0824d43b in FunctionCall6 ()
#5 0x08096395 in index_insert ()
#6 0x081515d6 in ExecInsertIndexTuples ()
#7 0x081499e0 in ExecutorRun ()
#8 0x081d158e in ProcessQuery ()
#9 0x081d1771 in PortalRunMulti ()
#10 0x081d2029 in PortalRun ()
#11 0x08120ddb in ExecuteQuery ()
#12 0x081d0b51 in PortalRunUtility ()
#13 0x081d18bc in PortalRunMulti ()
#14 0x081d2029 in PortalRun ()
#15 0x081cdbd0 in exec_simple_query ()
#16 0x081cf197 in PostgresMain ()
#17 0x081a72df in ServerLoop ()
#18 0x081a808a in PostmasterMain ()
#19 0x081686b0 in main ()

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-12-15 03:19:56 Re: Compiling problem on Solaris
Previous Message Zdenek Kotala 2006-12-14 17:02:30 Re: Compiling problem on Solaris