postgresql/contrib/vacuumlo/README.vacuumlo

55 lines
1.4 KiB
Plaintext
Raw Normal View History

2003-11-29 20:52:15 +01:00
$PostgreSQL: pgsql/contrib/vacuumlo/README.vacuumlo,v 1.4 2003/11/29 19:51:36 pgsql Exp $
2000-06-19 16:02:16 +02:00
This is a simple utility that will remove any orphaned large objects out of a
2000-11-21 18:54:21 +01:00
PostgreSQL database. An orphaned LO is considered to be any LO whose OID
does not appear in any OID data column of the database.
2000-06-19 16:02:16 +02:00
Compiling
--------
Simply run make. A single executable "vacuumlo" is created.
2000-11-21 18:54:21 +01:00
Usage
-----
2000-06-19 16:02:16 +02:00
vacuumlo [options] database [database2 ... databasen]
2000-06-19 16:02:16 +02:00
All databases named on the command line are processed. Available options
include:
-v Write a lot of progress messages
-n Don't remove large objects, just show what would be done
-U username Username to connect as
-W Prompt for password
-h hostname Database server host
-p port Database server port
2000-06-19 16:02:16 +02:00
2000-11-21 18:54:21 +01:00
2000-06-19 16:02:16 +02:00
Method
------
First, it builds a temporary table which contains all of the OIDs of the
2000-06-19 16:02:16 +02:00
large objects in that database.
It then scans through all columns in the database that are of type "oid"
or "lo", and removes matching entries from the temporary table.
2000-11-21 18:54:21 +01:00
The remaining entries in the temp table identify orphaned LOs. These are
removed.
2000-06-19 16:02:16 +02:00
2000-11-21 18:54:21 +01:00
Notes
-----
2000-06-19 16:02:16 +02:00
I decided to place this in contrib as it needs further testing, but hopefully,
2000-11-21 18:54:21 +01:00
this (or a variant of it) would make it into the backend as a "vacuum lo"
command in a later release.
2000-06-19 16:02:16 +02:00
Peter Mount <peter@retep.org.uk>
http://www.retep.org.uk
March 21 1999
Committed April 10 1999 Peter