WARNING

This text was automatically converted from troff me macros to HTML. Information may have been lost, added, or changed in the process. Lars Aronsson and Lysator do not guarantee the correctness of this HTML document.

NAME

destroydb *- destroy an existing database

SYNOPSIS

destroydb [-p port] [-h host] username

DESCRIPTION

Destroydb removes all reference to an existing database named dbname. The directory containing this database and all associated files are removed.

To execute this command, the user must be the DBA for this database. After the database is destroyed, a UNIX shell prompt will reappear; no confirmation message will be displayed.

Destroydb needs to connect to a running postmaster to accomplish its tasks. If no postmaster is running then one must be started before destroydb is run.

COMMAND OPTIONS

-p port indicates that destroydb should attempt to connect to a postmaster listening to the specified port.

-h hostname indicates that destroydb should attempt to connect to a postmaster running on the specified host machine.

EXAMPLE

/* destroy the demo database */
destroydb demo

/* destroy the demo database using the postmaster on host eden, port 1234 */
destroydb -p 1234 -h eden demo

DIAGNOSTICS

Error: Failed to connect to backend (host=xxx, port=xxx)

destroydb could not attach to the postmaster on the specified host and port. If you see this message, check that the postmaster is running on the proper host and that the proper port is specified.

FILES

&.../data/base/*

SEE ALSO

createdb(unix), postmaster(unix), destroydb(commands).