Re: Another LargeObject problem - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Another LargeObject problem
Date
Msg-id 8358.1059143280@sss.pgh.pa.us
Whole thread Raw
In response to Another LargeObject problem  (Ole Streicher <ole-usenet-spam@gmx.net>)
List pgsql-jdbc
Ole Streicher <ole-usenet-spam@gmx.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

pgsql-jdbc by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: Another exception (Transaction level)
Next
From: Paul Thomas
Date:
Subject: Re: Another exception (Transaction level)