Transaction safety and large objects. Possible?

From: Eric Davies <Eric(at)barrodale(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Transaction safety and large objects. Possible?
Date: 2006-01-30 21:14:39
Message-ID: 6.2.5.6.0.20060130104041.03178e18@barrodale.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've got some server functions that were previously written using libpq.
They work fine. However because they need to open their own
connection to insert into tables and write into large objects, etc,
they aren't transaction safe. That is to say, if a user starts a transaction,
executes my functions, and then tries to abort or roll back the transaction,
nothing will happen because the work was done in a different connection.

Now I'm trying to make the functions transaction safe. In theory, all
I need to do is convert my libpq calls to equivalent SPI calls.
However, there don't appear to be any SPI equivalents for the large
object functions like lo_write and lo_read. Relying on the Toaster
mechanism is not an option as my data sizes are too large to fit in
memory. Am I correct in believing that large objects can not be
directly handled by a server function in a transaction safe manner?

Thank you
Eric.

**********************************************
Eric Davies, M.Sc.
Barrodale Computing Services Ltd.
Tel: (250) 472-4372 Fax: (250) 472-4373
Web: http://www.barrodale.com
Email: eric(at)barrodale(dot)com
**********************************************
Mailing Address:
P.O. Box 3075 STN CSC
Victoria BC Canada V8W 3W2

Shipping Address:
Hut R, McKenzie Avenue
University of Victoria
Victoria BC Canada V8W 3W2
**********************************************

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ed L. 2006-01-30 21:25:43 pg 8.1.2 ERROR: direct correlated subquery unsupported as initplan
Previous Message rlee0001 2006-01-30 19:27:23 Re: 8.0.3 regexp_replace()...