Re: transaction block: server closed the connection unexpectedly - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: transaction block: server closed the connection unexpectedly
Date
Msg-id 20040906131322.GA5426@dcc.uchile.cl
Whole thread Raw
In response to transaction block: server closed the connection unexpectedly  ("Koju Iijima" <koju@fast.fujitsu.com.au>)
Responses Re: transaction block: server closed the connection unexpectedly  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, Sep 06, 2004 at 04:41:32PM +1000, Koju Iijima wrote:

Hi,

> template1=# BEGIN;
> BEGIN
> template1=# CREATE TABLE FOO ( a int unique);
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index "foo_a_key" for table "foo"
> CREATE TABLE
> template1=# INSERT INTO FOO VALUES ( 0 );
> INSERT 17232 1
> template1=# INSERT INTO FOO VALUES ( 0 );
> ERROR:  duplicate key violates unique constraint "foo_a_key"
> FATAL:  block 1 of 1663/1/17230 is still referenced (private 1, global 1)

The problem is that there's a pin on an index page when the smgr tries
to drop its buffers.  This patch corrects this problem, by having
resowner cleanup before smgr.

It also passes regression tests.  Not sure if it's the correct solution
though, but it seems the natural thing to me.

Thanks for the report.  I wonder how we managed to miss this.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Estoy de acuerdo contigo en que la verdad absoluta no existe...
El problema es que la mentira sí existe y tu estás mintiendo" (G. Lama)

Attachment

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1239: Stale postmaster.pid prevents server start
Next
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1240: memory leak in JDBC driver build 215