From: Grant <grant@conprojan.com.au>
To: pgsql-sql@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: [SQL] deleting large objects from jdbc
Date: Mon, 20 Aug 2001 11:52:35 +1000 (EST)
Message-ID: <Pine.LNX.4.21.0108201149520.762-100000@webster.conprojan.com.au> (raw)
In-Reply-To: <H000007e0003c614.0997248771.server1.workware@MHS>
> 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: grant@conprojan.com.au, pgsql-admin@postgresql.org
Subject: Re: [SQL] deleting large objects from jdbc
In-Reply-To: <Pine.LNX.4.21.0108201149520.762-100000@webster.conprojan.com.au>
References: <H000007e0003c614.0997248771.server1.workware@MHS> <Pine.LNX.4.21.0108201149520.762-100000@webster.conprojan.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox