---
name: "pcp_detach_node"
section: "1"
platform: "linux"
package: "pgpool2"
version: "4.6.1-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pcp_detach_node"
---

# pcp\_detach\_node(1)

detaches the given node from Pgpool-II. Existing connections to Pgpool-II are forced to be disconnected.

## NAME

pcp\_detach\_node - detaches the given node from Pgpool-II. Existing connections to Pgpool-II are forced to be disconnected.

## SYNOPSIS

**pcp\_detach\_node** \[*options*...\] \[*node\_id*\] \[*gracefully*\]

## DESCRIPTION

**pcp\_detach\_node** detaches the given node from Pgpool-II. If failover\_command and/or follow\_primary\_command are specified, they are executed too. Existing connections to Pgpool-II are forced to be disconnected.

**pcp\_detach\_node** just detaches the node, and does not touch running backend behind the node. This command is useful when admin needs to maintain the PostgreSQL node. He/she can shutdown or stop the backend as many times as he/she wants.

The safest way to re-attach the detached node is, stopping the backend and apply [**pcp\_recovery\_node**(1)](/pcp_recovery_node/1.md). However if you are sure that there's no replication delay (or the delay will be recovered later on) and the role of the node (primary/standby) will not be changed, you can use [**pcp\_attach\_node**(1)](/pcp_attach_node/1.md).

## OPTIONS

- **-n** *node\_id* **--node\_id=***node\_id*

  The index of backend node to detach.

- **-g** **--gracefully**

  wait until all clients are disconnected (unless client\_idle\_limit\_in\_recovery is -1 or recovery\_timeout is expired).

**Other options**

See [**pcp\_common\_options**(1)](/pcp_common_options/1.md).
