From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | t-ishii(at)sra(dot)co(dot)jp |
Cc: | t-ishii(at)sra(dot)co(dot)jp, tgl(at)sss(dot)pgh(dot)pa(dot)us, hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] 6.4.1 release |
Date: | 1998-12-13 05:10:46 |
Message-ID: | 199812130510.AAA14948@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > > I think at least large object stuffs should be fixed(just a "select
> > > lo_import('/foo/bar')" easily kills backend) before 6.4.1. I've been
> > > looking into codes for sometime but have not found complete fixes yet.
> >
> > I thought we already had a large object fix in the two trees already?
>
> So you fixed inv_api.c? I got cvs header in REL6_4 tree (FreeBSD
> 2.2.6-RELEASE). Is this the latest one?
>
> * $Header: /usr/local/cvsroot/pgsql/src/backend/storage/large_object/in\
> v_api.c,v 1.41 1998/10/06 03:55:43 momjian Exp $
>
> Following is a backend-crashing example. Any idea?
>
> (/tmp/html.tar.gz is a 102458 bytes long file)
>
> > select lo_import('/tmp/html.tar.gz');
> blank
> 1: lo_import (typeid = 26, len = 4, typmod = -1, byval = t)
> ----
Fixed. Since I re-designed the heap access API, the bug was crystal
clear as soon as I looked at the code. Scarry when I can figure out the
backend code so quickly.
Patch applied to both trees.
---------------------------------------------------------------------------
*** ./inv_api.c.orig Sun Dec 13 00:05:01 1998
--- ./inv_api.c Sun Dec 13 00:06:51 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,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;
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas G. Lockhart | 1998-12-13 05:11:04 | Re: [HACKERS] ecpg man page |
Previous Message | Bruce Momjian | 1998-12-13 04:44:59 | Re: [GENERAL] Announce: PyGreSQL 2.2 |