Skip site navigation (1) Skip section navigation (2)

Re: BUG #3763: crash after create table with primary keydefined

From: admin(at)abp(dot)pl
To: "Zdenek Kotala" <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3763: crash after create table with primary keydefined
Date: 2007-11-20 14:22:32
Message-ID: 55472.82.160.43.194.1195568552.squirrel@poczta.abp.pl (view raw or flat)
Thread:
Lists: pgsql-bugs
Dnia Wt Listopada 20 2007, 15:02, Zdenek Kotala napisał(a):
> admin(at)abp(dot)pl wrote:
>> Dnia Wt Listopada 20 2007, 14:20, Simon Riggs napisał(a):
>>> On Tue, 2007-11-20 at 11:46 +0000, Heikki Linnakangas wrote:
>>>>>> In logs after this:
>>>>>> Nov 20 11:02:04 www postgres[32757]: [4-1] wolni>NOTICE:  CREATE
>>>> TABLE /
>>>>>> PRIMARY KEY will create implicit index "phpbb_acl_roles_data_pkey"
>>>> for
>>>>>> table
>>>>>> Nov 20 11:02:04 www postgres[32731]: [2-1] >LOG:  server process
>>>>>> (PID
>>>> 32757)
>>>>>> was terminated by signal 11
>>>
>>>> To me it does look like it was the CREATE TABLE that crashed. The
>>>> NOTICE
>>>>   shows that it's process ID 32757 that's running the CREATE TABLE,
>>>> and
>>>> the LOG line later on says that that's the process that crashed.
>>> Yep, agreed. :-(
>>>
>> OK so what we can do now?
>
> Do you have core file? It is usually stored in data postgreSQL
> directory. Can you provide stack trace to determine which function
> fails? It is very important.

I cant get core file now.

wolni=>  CREATE TABLE phpbb_acl_roles_data ( role_id INT4 DEFAULT '0' NOT
NULL CHECK (role_id >= 0), auth_option_id INT4 DEFAULT '0' NOT NULL CHECK
(auth_option_id >= 0), auth_setting INT2 DEFAULT '0' NOT NULL);
CREATE TABLE

...
> what's happen when you create primary key by alter table command?

wolni=> ALTER TABLE phpbb_acl_roles_data add PRIMARY KEY (role_id,
auth_option_id);
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index
"phpbb_acl_roles_data_pkey" for table "phpbb_acl_roles_data"
WARNING:  you don't own a lock of type RowExclusiveLock
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: Succeeded.

but when
> what's happen when you create unique index on (role_id, auth_option_id)?

wolni=> CREATE UNIQUE INDEX indeks ON phpbb_acl_roles_data (role_id,
auth_option_id);
CREATE INDEX



> Is it fresh database? Can you reproduce it on the same machine with the
> same postgreSQL installation on new created database cluster?

Yes, its fresh database (without tables).

Regards
-- 
Tomasz


Responses

pgsql-bugs by date

Next:From: Mike CharnokyDate: 2007-11-20 15:29:06
Subject: Re: BUG #3752: query yields "could not find block containing chunk", then server crashes
Previous:From: Heikki LinnakangasDate: 2007-11-20 14:06:48
Subject: Re: BUG #3763: crash after create table with primary keydefined

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group