pgxc_clean

Name

pgxc_clean -- clean up outstanding 2PC status among Postgres-XC nodes

Synopsis

pgxc_clean [option...]

Description

Note: XCONLY: The following description applies only to Postgres-XC.

pgxc_clean has the following synopsis.

pgxc_clean [ option ] [dbname[username]]

pgxc_clean is Postgres-XC utility to maintain transaction status after a crash. When some Postgres-XC node crashes and recovers or fails over, commit status of such node may be inconsistent with other nodes. pgxc_clean checks transaction commit status and corrects them.

You should run this utility against one of the available Coordinators. The tool cleans up transaction status of all the nodes automatically.

Options

-a
--all

Cleanup all the database available. all.

-ddatabasename
--dbname=databasename

Database name to clean up. This option can be specified multiple times for more than one database.

-hhostname
--command=hostname

Hostname of the Coordinator to connect to.

-N
--no-clean

If this option is specified, pgxc_clean will not perform the cleanup. It just investigates transaction status.

-o filename
--output=filename

Name of the file where pgxc_clean output will be written. If not specified, stdout and stderr will be used.

-p port_number
--port=port_number

Specifies the port number of the Coordinator.

-q
--quiet

Surpress messages as much as possible.

-s
--status

Prints investigated two phase commit status.

-U username
--username=username

User name to use. You must be a superuser of the database.

-v
--verbose

Write as much information as possible.

-V
--version

Writes the version of the utility and exits.

-w
--no-password

Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.

Note that this option will remain set for the entire session, and so it affects uses of the meta-command \connect as well as the initial connection attempt.

-W
--password

Force psql to prompt for a password before connecting to a database.

This option is never essential, since psql will automatically prompt for a password if the server demands password authentication. However, psql will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt.

Note that this option will remain set for the entire session, and so it affects uses of the meta-command \connect as well as the initial connection attempt.

-?
--help

Show help about psql command line arguments, and exit.