PCP_DETACH_NODE(1)
π
PCP_DETACH_NODE β yeah it's a pcp_detach_node(1) situation bestie
okay so real talk, this is the pgpool-II 4.7.2 Documentation page for pcp_detach_node, and she is that girl. let's get into it π
β¨ NAME β¨
pcp_detach_node β detaches the given node from Pgpool-II. Existing connections to Pgpool-II are forced to be disconnected. no cap, the connections are getting βοΈ'd
π SYNOPSIS π
pcp_detach_node [options...] [node_id] [gracefully]
π DESCRIPTION π
so pcp_detach_node detaches the given node from Pgpool-II, periodt. and if failover_command and/or follow_primary_command are specified, they get executed too β they're coming along for the ride bestie π«Ά
also existing connections to Pgpool-II are forced to be disconnected. not asked, not negotiated, just gone π
here's the thing though: pcp_detach_node just detaches the node, it does not touch the running backend behind the node. she's a hands-off queen π. that's literally why this command is iconic β when an admin needs to maintain the PostgreSQL node, she can shutdown or stop the backend as many times as she wants. as many. times. π₯
now, the safest way to re-attach the detached node is:
- stop the backend, and
- apply
pcp_recovery_node(1)
that's the safe route, take it. however β and this is a big however β if you're 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, then you can use pcp_attach_node(1). like, only then. iykyk π
β¨ OPTIONS β¨
-nnode_id--node_id=node_id β The index of backend node to detach. that's the β¨loreβ¨, that's the node you're sending away.-g--gracefullyβ wait until all clients are disconnected (unlessclient_idle_limit_in_recoveryis-1orrecovery_timeoutis expired). polite detachment, we love to see it π
π Other options π
- See
pcp_common_options(1)β she has her own whole page, go read it bestie πΈ
pgpool-II 4.7.2 Β· 2023 Β· PCP_DETACH_NODE(1) β that's the whole page babes, go detach responsibly and slay πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: pgpool2 4.7.2-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms