Re: [BUGS] bug in postgresql-v6.4 on FreeBSD

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: Edmund Mergl <E(dot)Mergl(at)bawue(dot)de>
Cc: pgsql-bugs(at)postgreSQL(dot)org, hackers(at)postgreSQL(dot)org
Subject: Re: [BUGS] bug in postgresql-v6.4 on FreeBSD
Date: 1998-11-12 07:29:43
Message-ID: 199811120729.QAA22041@srapc451.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>here is a bug which is reproducible on FreeBSD-2.2.6
>as well as on FreeBSD-2.2.7:
>
>
>nadia:mergl> echo -n "testing large objects using blob_read" >/tmp/gaga
>nadia:mergl> createdb pgtest
>nadia:mergl> psql pgtest
>...
>pgtest=> CREATE TABLE lobject ( id int4, loid oid );
>CREATE
>pgtest=> INSERT INTO lobject (id, loid) VALUES (1, lo_import('/tmp/gaga'));
>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.

Reproduced here too. Please try included patches...

Tatsuo Ishii
t-ishii(at)sra(dot)co(dot)jp
---------------------------------------------------------------------------
*** postgresql-v6.4/src/backend/storage/large_object/inv_api.c~ Thu Nov 5 17:48:26 1998
--- postgresql-v6.4/src/backend/storage/large_object/inv_api.c Thu Nov 12 15:52:59 1998
***************
*** 549,556 ****
tuplen = inv_wrnew(obj_desc, buf, nbytes - nwritten);
else
tuplen = inv_wrold(obj_desc, buf, nbytes - nwritten, tuple, buffer);
}
! ReleaseBuffer(buffer);

/* move pointers past the amount we just wrote */
buf += tuplen;
--- 549,557 ----
tuplen = inv_wrnew(obj_desc, buf, nbytes - nwritten);
else
tuplen = inv_wrold(obj_desc, buf, nbytes - nwritten, tuple, buffer);
+ ReleaseBuffer(buffer);
}
!

/* move pointers past the amount we just wrote */
buf += tuplen;

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 1998-11-12 07:41:00 Re: [HACKERS] CORBA interface in backend?
Previous Message Dmitry Samersoff 1998-11-12 07:24:22 Re: <string>