Re: Another LargeObject problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ole Streicher <ole-usenet-08(at)gmx(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Another LargeObject problem
Date: 2003-07-25 14:28:00
Message-ID: 8358.1059143280@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Ole Streicher <ole-usenet-spam(at)gmx(dot)net> writes:
> I have another Problem when using LargeObjects.
>> From time to time, I get the exception
> FastPath call returned ERROR: lo_lseek: invalid large obj descriptor (369)
> What does this exception mean?

It means the descriptor you opened with lo_open isn't open anymore (or
that you're passing the wrong descriptor number, but the former is more
likely). Descriptors are closed at transaction end, so you have to hold
open a transaction block for your entire lo_open .. lo_close sequence.

> It occurs randomly; a repeated retrieval works usually.

If it seems "random" then you are probably being careless with
connection pooling. You've got to hold onto the same connection and
same transaction for as long as you're using the LO.

regards, tom lane

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Paul Thomas 2003-07-25 15:11:15 Re: Another exception (Transaction level)
Previous Message Csaba Nagy 2003-07-25 14:23:44 Re: Another exception (Transaction level)