Re: [INTERFACES] Problems with postgres V6.5.3 large objects

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Charles Randle <caspanis(at)cybervale(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] Problems with postgres V6.5.3 large objects
Date: 1999-12-05 23:32:48
Message-ID: 7702.944436768@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Charles Randle <caspanis(at)cybervale(dot)com> writes:
> 1) Whenever I try to open more than one large object within my class
> (I'm using C++) The following message appears in the postgres backend
> log-file & the application terminates .

> ERROR: update_fp_info: cache lookup for function 1 failed

This indicates that PQfn is being called with bad parameters (function
ID 1; there's no such function). How are you accessing the large
objects, exactly?

> 2) I am thinking of using the libpq++ interface to access the large
> objects , However from what I've seen each instance of the class would
> create a new connection to the backend , from the same process !

Yes. This is a horribly brain-dead design; PgLargeObject needs to be
rethought and rewritten. Probably PgLargeObject's constructor ought to
take a reference to an existing connection object that it uses, rather
than containing a connection object of its own. (For robustness, that
would probably mean adding some kind of reference count to the
connection objects...)

> a) How expensive is this multiple connection option given that
> many large objects may be in use at any one time ?

Very. It's totally impractical if you are going to make heavy use of
large objects.

Most of the developers have not wanted to put much effort into large
objects, since where we really want to go is to eliminate tuple size
restrictions; once that happens large objects will be much less
necessary. In the meantime, though, better code for PgLargeObject
would be a nice contribution if you are interested.

regards, tom lane

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Thomas Lockhart 1999-12-06 02:02:15 Re: [INTERFACES] Spanish format on date and numbers
Previous Message Charles Randle 1999-12-05 20:37:31 Problems with postgres V6.5.3 large objects