On Thursday 25 January 2001 10:27, [EMAIL PROTECTED] wrote:
> We have written a web application using Turbine and Postgresql 7.02. The
> version of Turbine I use is 20000908 - Ancient I know, but we couldn't
> code against a moving target, so that was the version we used. It has been
> reliable enough for us and we are happy with it.
> However, we have noticed that after 3 months of testing, the DB server has
> got a huge quantity of orphaned xinv and xinx files. These are reference
> files used by Postgresql when it deals with Blobs.
>
> In the SQL script for the Visitor table (as it was back then) there are
> rules defined:
>
> CREATE RULE Visitor delete_lo AS
> ON DELETE TO Visitor
> DO SELECT lo_unlink(old.OBJECTDATA);
>
> and
>
> CREATE RULE objectdata_delete_lo AS
> ON DELETE TO Visitor
> DO SELECT lo_unlink(old.objectdata);
>
> I believe this is an attempt to clear up the orphaned xinv and xinx files
> after a delete.
> However we have found this is not removing all the xin* files.
>

In the postgres distribution contrib/lo source directory you will find a file 
called test.sql.  It has an example trigger that might do what you need. For 
table named TestTable with an lo field named test_lo it looks like this 

create trigger t_test_lo before update or delete on TestTable for each row 
execute procedure lo_manage(test_lo); 

Hope this helps.
John
-- 
********************************
** John Thorhauer
** [EMAIL PROTECTED]
** take a look at:
**  http://tambora.zenplex.org
**  http://www.zenplex.org
**  http://www.zenplex.com
********************************



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to