Bug: interference between two sessions

From: Tom I Helbekkmo <tih(at)Hamartun(dot)Priv(dot)NO>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Bug: interference between two sessions
Date: 1998-02-09 20:54:58
Message-ID: 980209214253.11729A@barsoom.Hamartun.Priv.NO
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm seeing what looks like an ugly bug in the February 8th snapshot,
running under NetBSD/sparc 1.3. Here's the sequence of events (note
that it's doesn't have to be this particular table; I've reproduced
this with different ones):

* I run initdb as 'postgres', and create a user 'tih'.
* As 'tih', I then create a data base 'sr11', and connect to it with psql.
* I then create a table and an index from psql, thus:

create table food_des (
ndb_no char(5) not null,
fdgp_cd char4 not null,
descrip text not null,
shrt_desc varchar(60) not null,
ref_desc varchar(45) not null,
refuse int2,
sciname varchar(60),
n_factor float4,
pro_factor float4,
fat_factor float4,
cho_factor float4
);

create unique index food_des_ndb_no on food_des (ndb_no);

* Then, in the psql session, I load data from an external file, thus:

copy food_des from '/u/tih/databases/SR11/food_des.load' using delimiters '^';

* While this is running, in a separate shell I try to create the default
* data base for user 'tih' (upon this error, disk activity stops):

barsoom:tih> createdb
Connection to database 'template1' failed.
PQexec() -- There is no connection to the backend.
createdb: database creation failed on tih.
barsoom:tih>

* When this happens, the postmaster process reports the following:

ERROR: cannot write block 6 of food_des_ndb_no [sr11] blind

* The 'postmaster' and one 'postgres' process are still active.
* Further attempts at starting psql sessions will just hang.

Any ideas? I can reproduce this easily, so I can test any time.

-tih
--
Popularity is the hallmark of mediocrity. --Niles Crane, "Frasier"

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1998-02-10 03:00:24 Re: [HACKERS] AIX port s_lock.h __AIX --> _AIX
Previous Message Vadim B. Mikheev 1998-02-09 17:56:06 Re: [PATCHES] Re: [HACKERS] Query->hasSubLinks is always FALSE...