PURGE(1)

NAME
purge - destroy expired and temporary relations in INGRES databases

SYNOPSIS
purge [-f] [-p] [-a] [-s] [-+-w] [database ...]

DESCRIPTION
The purge utility searches the named databases, deleting system temporary relations.

Only the database administrator (DBA) for a database may run purge, except that the INGRES superuser may purge any database by using the -s flag.

If no databases are specified, all databases for which the current user is the DBA will be purged. All databases will be purged if the INGRES superuser has specified the -s flag.

The purge utility will lock the database while it is being processed, since errors may occur if the database is active while purge is working. If a database is busy, purge will report this and go on to the next database, if any.

The options are as follows:

-f  Delete unrecognizable files. Normally purge will just report these files.

-p  Delete expired user relations in addition to system temporaries.

-a  Print a message about each pending operation and execute it only if the response is ‘y’. Any other response is interpreted as “no”.

-s  Allow the INGRES superuser to purge any database.

-+-w
    Control database wait behavior. If -w is stated, purge will not wait for a busy database, regardless of whether standard input is a terminal. If +w is stated, purge will always wait. If omitted and standard input is not a terminal, purge will wait for the database to be free.

EXAMPLES
    purge -p +w tempdata
    purge -a -f

DIAGNOSTICS

who are you?
    Not entered into the users file.

not ingres superuser
    Attempted to use the -s flag without being the INGRES superuser.

you are not the dba
    Attempted to purge a database for which the user is not the DBA.

cannot access database
    The database does not exist.

SEE ALSO
ingres(1), restore(1), sysmod(1)

BUGS
If no database names are given, only the databases located in the data/base directory are purged, and not old databases in the datadir directory. Explicit database names still work for databases in either directory.

HISTORY
Originally part of UC Berkeley INGRES 8.9 (1988).