Back-end dying on timestamp value insert - Mailing list pgsql-general

From Rachel Greenham
Subject Back-end dying on timestamp value insert
Date
Msg-id 3886EB7B.4ED8E3DC@enetgroup.co.uk
Whole thread Raw
List pgsql-general
I'm having a problem, both through JDBC and through psql (so I reckon
the problem is in the core database) whereby if I put a value into a
timestamp field which has a non-unique index on it, I get a "back-end
has died unexpectedly" error.

It's consistently happening on the same column in the same table, even
after destroying and recreating the databases. There is another
timestamp column, also indexed, in the same table which behaves
perfectly I'm flummoxed. Help!

More data:

The table is of the form:

create table my_table (id int not null, startdate timestamp, enddate
timestamp);
create unique index id_idx on my_table (id);
create index startdate_idx on my_table (startdate datetime_ops);
create index enddate_idx on my_table (enddate datetime_ops);

insert into my_table (id, startdate) values (1, 'now');

this works fine then:

insert into my_table (id, enddate) values (2, 'now');

this fails with backend-death. If I drop the index on enddate I can
insert values fine, but then the backend dies if I subsequently create
the index.

The debugging output, with debuglevel set to 3 is:

StartTransactionCommand
query: insert into cat_entries (ent_id, ent_code, ent_enddate,
ent_tmg_id, ent_is_group) values (455, 'wibble', 'now', 1, 0);
ProcessQuery
/usr/lib/pgsql/bin/postmaster: reaping dead processes...
/usr/lib/pgsql/bin/postmaster: CleanupProc: pid 11763 exited with status
11
/usr/lib/pgsql/bin/postmaster: CleanupProc: reinitializing shared memory
and semaphores
shmem_exit(0) [#0]
binding ShmemCreate(key=52e389, size=1063936)

and psql exits with:

mydb=> insert into cat_entries (ent_id, ent_code, ent_enddate,
ent_tmg_id, ent_is_group) values (455, 'wibble', 'now', 1, 0);
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
We have lost the connection to the backend, so further processing is
impossible.
Terminating.

What's happening? :-) And is it something known about fixed in a later
version?

(I'm on Postgresql 6.5.1 as supplied with SuSE Linux 6.3)
[PostgreSQL 6.5.1 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66]

--
Rachel

pgsql-general by date:

Previous
From: "J. Roeleveld"
Date:
Subject: Re: [GENERAL] Grant problems
Next
From: Andrzej Mazurkiewicz
Date:
Subject: RE: [GENERAL] Grant problems