Received: from pirania.dif.um.es (IDENT:root@pirania.dif.um.es [155.54.210.33]) by hub.org (8.10.1/8.10.1) with ESMTP id e94CKaG59190 for ; Wed, 4 Oct 2000 08:20:36 -0400 (EDT) Received: from dif.um.es (IDENT:gabilm@pirania.dif.um.es [127.0.0.1]) by pirania.dif.um.es (8.9.3/8.9.3) with ESMTP id OAA04861 for ; Wed, 4 Oct 2000 14:19:23 +0200 Message-ID: <39DB2040.DA77A982@dif.um.es> Date: Wed, 04 Oct 2000 14:19:12 +0200 From: Gabriel Lopez X-Mailer: Mozilla 4.72 [es] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: psql Subject: LargeObjectManager problem Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200010/9 Hi all. I'm working with LargeObjectManager to create LOB object as the documentation examples. I have postgresql 7.0.2 with jdk1.2 and jsdk20 I have the following method to create LOB objects: *********************************************************************** private int createLOB(ByteArrayInputStream bais) throws FileNotFoundException, IOException, SQLException { System.err.println("Creating a large object"); int oid = lobj.create(LargeObjectManager.READ|LargeObjectManager.WRITE); System.err.println("Open a large object"); LargeObject obj = lobj.open(oid,LargeObjectManager.WRITE); System.err.println("Copying file to large object"); byte buf[] = new byte[2048]; int s,tl=0; while((s=bais.read(buf,0,2048))>0) { System.out.println("Block size="+s+" offset="+tl); obj.write(buf,0,s); tl+=s; } System.err.println("Closing object"); obj.close(); return oid; } ************************************************************************** when I insert the LOB object in a table: ByteArrayInputStream bais = new ByteArrayInputStream(x); int oid = createLOB(bais); String query = "insert into tupdate values ('"+ pkey_value +"','" + CN + "','" + client + "','" +requestFormat + "','" + date + "','" + oid + "','" + updated +"')"; s.executeUpdate(query); connection.commit(); bais.close(); It work fine, but sometime (only sometime) fail with: FastPath call returned FATAL 1: my bits moved right off the end of the world! Recreate index pg_attribute_relid_attnam_index. at org.postgresql.fastpath.Fastpath.fastpath(Compiled Code) at org.postgresql.fastpath.Fastpath.fastpath(Compiled Code) at org.postgresql.fastpath.Fastpath.getInteger(Compiled Code) at org.postgresql.largeobject.LargeObjectManager.create(Compiled Code) at piscis.pki.ca.database.DBManager.createLOB(Compiled Code) .............. CArevoke Error: FastPath call returned FATAL 1: my bits moved right off the end of the world! Recreate index pg_attribute_relid_attnam_index. Why? Can anybody help me, please -- Gabriel López Millán Facultad de Informática -Universidad de Murcia 30001 Murcia - España (Spain) Telf: +34-968-364644 E-mail: gabilm@dif.um.es