Received: from webster.conprojan.com.au (raw130515-1.gw.connect.com.au [202.21.11.98]) by postgresql.org (8.11.3/8.11.4) with SMTP id f7K1qiP89325 for ; Sun, 19 Aug 2001 21:52:44 -0400 (EDT) (envelope-from grant@conprojan.com.au) Received: (qmail 3102 invoked by uid 523); 20 Aug 2001 01:52:35 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Aug 2001 01:52:35 -0000 Date: Mon, 20 Aug 2001 11:52:35 +1000 (EST) From: Grant To: pgsql-sql@postgresql.org cc: pgsql-admin@postgresql.org Subject: Re: [SQL] deleting large objects from jdbc In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200108/60 X-Sequence-Number: 1996 > I've been browsing the newsgroup archives and came across the following: > > > > > > > Can you see a scenario where a programmer would forget to > delete the > > > > > > data from pg_largeobject and the database becoming very large > filled > > > > > > with orphaned large objects? > > Does this mean that to delete my large object I need to delete the row > in my table, and also the row or rows in pg_largeobject. Currently I am > only deleting the row in my table. I have just been looking at the > pg_largeobject table, it seems to have more rows than I would expect in > it. Is the solution to pass these two commands to jdbc? > delete from my_table where lob_oid = 1234 > delete from pg_largeobject where loid = 1234 Yes or jdbc might have a large object unlink/delete/remove function. I use PHP and it has a function that will remove the large object for me, but your solution is just as good imo. * Another important point to note is that large objects are _not_ backed up by default.