From: | Howie <caffeine(at)toodarkpark(dot)org> |
---|---|
To: | Czarny Marcin <Marcin(dot)Czarny(at)plock(dot)petrochemia(dot)pl> |
Cc: | "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgreSQL(dot)org> |
Subject: | Re: [SQL] Deleting large objects from database. |
Date: | 1999-12-16 05:51:45 |
Message-ID: | Pine.LNX.3.96.991216054908.25654E-100000@rabies.toodarkpark.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tue, 14 Dec 1999, Czarny Marcin wrote:
> I have column with large objects in table named my_table.
> After SQL command:
> delete from my_table;
> they are still files xinv* and xinx* in directory ./data/base/my_db.
> Have I delete this files from operating system?
> What is wrong? I hope thats is only my ignorance?
delete'ing a record that 'holds' the LO's OID isnt the same as using
lo_unlink() to delete the LO from disk.
what you might want to do is look at $PGSQL_SRC_ROOT/contrib/lo.
'lo_manage()' is a function you can use in a DELETE trigger that, assuming
a row 'housing' the LO's OID gets wiped, will lo_unlink() the LO, removing
it from disk. its got a small bug ( doesnt, or didnt, properly check for
NULL OIDs ), so be warned.
---
Howie <caffeine(at)toodarkpark(dot)org> URL: http://www.toodarkpark.org
"Tell a man that there are 400 billion stars and he'll believe you.
Tell him a bench has wet paint and he has to touch it."
From | Date | Subject | |
---|---|---|---|
Next Message | George Moga | 1999-12-16 07:04:30 | Re: [SQL] TRANSACTIONS and TCP/IP |
Previous Message | Tom Lane | 1999-12-16 03:42:32 | Re: [SQL] TRANSACTIONS and TCP/IP |