Re: [HACKERS] 6.4.1 release

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] 6.4.1 release
Дата
Msg-id 199812130510.AAA14948@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] 6.4.1 release  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Ответы Re: [HACKERS] 6.4.1 release  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список 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@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] ecpg man page
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] 6.4.1 release