pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5950: backend terminating after altering table
5+ messages / 3 participants
[nested] [flat]

* BUG #5950: backend terminating after altering table
@ 2011-03-25 13:37 alex <perepelica.alex@gmail.com>
  2011-03-25 15:30 ` Re: BUG #5950: backend terminating after altering table Tom Lane <tgl@sss.pgh.pa.us>
  2011-03-28 19:47 ` Re: BUG #5950: backend terminating after altering table Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 5+ messages in thread

From: alex @ 2011-03-25 13:37 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      5950
Logged by:          alex
Email address:      perepelica.alex@gmail.com
PostgreSQL version: 9.0.3
Operating system:   archlinux x86_64
Description:        backend terminating after altering table
Details: 

Such steps:
1. create table t (
);
2. alter table t add childs t;
3. alter table t add id serial not null primary key;
This messages from psql:

NOTICE:  ALTER TABLE will create implicit sequence "t_id_seq" for serial
column "t.id"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "t_pkey"
for table "t"
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

backend - terminated



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #5950: backend terminating after altering table
  2011-03-25 13:37 BUG #5950: backend terminating after altering table alex <perepelica.alex@gmail.com>
@ 2011-03-25 15:30 ` Tom Lane <tgl@sss.pgh.pa.us>
  2011-03-28 18:04   ` Re: BUG #5950: backend terminating after altering table Sergey Burladyan <eshkinkot@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Tom Lane @ 2011-03-25 15:30 UTC (permalink / raw)
  To: alex <perepelica.alex@gmail.com>; +Cc: pgsql-bugs

"alex" <perepelica.alex@gmail.com> writes:
> 1. create table t (
> );
> 2. alter table t add childs t;
> 3. alter table t add id serial not null primary key;
> server closed the connection unexpectedly

Hmm.  This seems to be fixed in HEAD:

regression=# create table t (
regression(# );
CREATE TABLE
regression=# alter table t add childs t;
ALTER TABLE
regression=#  alter table t add id serial not null primary key;
NOTICE:  ALTER TABLE will create implicit sequence "t_id_seq" for serial column "t.id"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "t_pkey" for table "t"
ERROR:  cannot alter table "t" because column "t"."childs" uses its rowtype

Interestingly, 8.2 also says the same --- but 8.3, 8.4, and 9.0 crash.
Looks like we broke the error check somewhere along the way, and whoever
fixed it neglected to back-patch.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #5950: backend terminating after altering table
  2011-03-25 13:37 BUG #5950: backend terminating after altering table alex <perepelica.alex@gmail.com>
  2011-03-25 15:30 ` Re: BUG #5950: backend terminating after altering table Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-03-28 18:04   ` Sergey Burladyan <eshkinkot@gmail.com>
  2011-03-28 18:15     ` Re: BUG #5950: backend terminating after altering table Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Sergey Burladyan @ 2011-03-28 18:04 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: alex <perepelica.alex@gmail.com>; pgsql-bugs

Tom Lane <tgl@sss.pgh.pa.us> writes:

> "alex" <perepelica.alex@gmail.com> writes:
> > 1. create table t (
> > );
> > 2. alter table t add childs t;
> > 3. alter table t add id serial not null primary key;
> > server closed the connection unexpectedly
>
> Hmm.  This seems to be fixed in HEAD:

Not fully. There are also two cases with Segmentation fault
(from sql.ru forum):
1.
create table t ();
alter table t add childs t;
create table selfchield_new (like t);

2.
create table t ();
alter table t add childs t;
create table selfchield_new as select * from t;

I have segmentation fault with current master 7c7fd882.

-- 
Sergey Burladyan



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #5950: backend terminating after altering table
  2011-03-25 13:37 BUG #5950: backend terminating after altering table alex <perepelica.alex@gmail.com>
  2011-03-25 15:30 ` Re: BUG #5950: backend terminating after altering table Tom Lane <tgl@sss.pgh.pa.us>
  2011-03-28 18:04   ` Re: BUG #5950: backend terminating after altering table Sergey Burladyan <eshkinkot@gmail.com>
@ 2011-03-28 18:15     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2011-03-28 18:15 UTC (permalink / raw)
  To: Sergey Burladyan <eshkinkot@gmail.com>; +Cc: alex <perepelica.alex@gmail.com>; pgsql-bugs

Sergey Burladyan <eshkinkot@gmail.com> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> "alex" <perepelica.alex@gmail.com> writes:
>>> 1. create table t (
>>> );
>>> 2. alter table t add childs t;
>>> 3. alter table t add id serial not null primary key;
>>> server closed the connection unexpectedly

>> Hmm.  This seems to be fixed in HEAD:

> Not fully. There are also two cases with Segmentation fault
> (from sql.ru forum):

Yeah, I had already come to the conclusion that it was just luck that
HEAD avoids the specific problem.  See
http://archives.postgresql.org/pgsql-hackers/2011-03/msg01673.php

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #5950: backend terminating after altering table
  2011-03-25 13:37 BUG #5950: backend terminating after altering table alex <perepelica.alex@gmail.com>
@ 2011-03-28 19:47 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 5+ messages in thread

From: Tom Lane @ 2011-03-28 19:47 UTC (permalink / raw)
  To: alex <perepelica.alex@gmail.com>; +Cc: pgsql-bugs

"alex" <perepelica.alex@gmail.com> writes:
> Such steps:
> 1. create table t (
> );
> 2. alter table t add childs t;
> 3. alter table t add id serial not null primary key;
> server closed the connection unexpectedly

Thanks for the report.  Fixed as per today's discussion (ie, disallow
creating a self-referencing rowtype).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2011-03-28 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-03-25 13:37 BUG #5950: backend terminating after altering table alex <perepelica.alex@gmail.com>
2011-03-25 15:30 ` Tom Lane <tgl@sss.pgh.pa.us>
2011-03-28 18:04   ` Sergey Burladyan <eshkinkot@gmail.com>
2011-03-28 18:15     ` Tom Lane <tgl@sss.pgh.pa.us>
2011-03-28 19:47 ` Tom Lane <tgl@sss.pgh.pa.us>

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