Re: large object unlinking

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: sandhya <sandhyar(at)amiindia(dot)co(dot)in>
Cc: Postgres <pgsql-admin(at)postgresql(dot)org>
Subject: Re: large object unlinking
Date: 2006-02-23 15:28:38
Message-ID: 20060223152838.GA36720@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Feb 23, 2006 at 01:24:43PM +0530, sandhya wrote:
> Is there any possibility to delete /Unlink a group of large objects at a time?
> Please tell me .To test my application i have loaded somany files into database.
> Now i want to unlink all those objects.

You could call lo_unlink() in a query. Example:

SELECT lo_unlink(loid) FROM (SELECT DISTINCT loid FROM foo) AS s;

See also contrib/vacuumlo, which will automatically remove large
objects that aren't referenced anywhere.

--
Michael Fuhr

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Moritz Bayer 2006-02-23 16:18:33 Deinstallation
Previous Message Simon Riggs 2006-02-23 14:24:22 Re: WAL recovery