pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Testing lo_unlink() in psql 2+ messages / 2 participants [nested] [flat]
* Testing lo_unlink() in psql @ 2007-10-03 15:52 Michael Goldner <MGoldner@agmednet.com> 0 siblings, 1 reply; 2+ messages in thread From: Michael Goldner @ 2007-10-03 15:52 UTC (permalink / raw) To: pgsql-admin I'm running postgres 8.1.8 on redhat. I have a very large table that contains an OID that refers to a large object. I have a rule defined that calls lo_unlink() on a delete. I seem to get a successful return status on the delete, but my total disk space used does not seem to shrink. I've run "VACUUM ANALYZE" on the table after the delete and have the same behavior. Do I need to run a "VACUUM FULL" to get the space back after an lo_unlink()? Is there some other reason I'm not reclaiming disk space after an lo_unlink()? Also, is there any way to determine the actual filename that the OID references? I'd like to be able to do an "ls -l <filename>" before and after the lo_unlink() command to confirm that the file has been removed. I can't really do lo_list from psql because the table is > 2.5 million rows. Thanks, Mike ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Testing lo_unlink() in psql @ 2007-10-03 16:25 Tom Lane <tgl@sss.pgh.pa.us> parent: Michael Goldner <MGoldner@agmednet.com> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2007-10-03 16:25 UTC (permalink / raw) To: Michael Goldner <MGoldner@agmednet.com>; +Cc: pgsql-admin "Michael Goldner" <MGoldner@agmednet.com> writes: > I've run "VACUUM ANALYZE" on the table after the delete and have the > same behavior. Do I need to run a "VACUUM FULL" to get the space back > after an lo_unlink()? Vacuuming the table isn't gonna help much, because all that reclaims is your table row, not the space occupied by the large object. Large objects live in pg_largeobject, and you need to be vacuuming *that* on a regular basis if you do much deleting or updating of large objects. > Also, is there any way to determine the actual filename that the OID > references? You appear to be seriously confused about how large objects are stored. See http://www.postgresql.org/docs/8.1/static/largeobjects.html http://www.postgresql.org/docs/8.1/static/catalog-pg-largeobject.html regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-10-03 16:25 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2007-10-03 15:52 Testing lo_unlink() in psql Michael Goldner <MGoldner@agmednet.com> 2007-10-03 16:25 ` Tom Lane <tgl@sss.pgh.pa.us>
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