PGPOOL_AD...TACH_NODE(3)

✨ PGPOOL_AD...TACH_NODE(3) ✨

okay bestie, so this is from the pgpool-II 4.7.2 Documentation, section 3 of the manuals β€” it's the glow-up era of pgpool docs πŸ’…


🌸 NAME 🌸

pgpool_adm_pcp_attach_node β€” a function to attach given node ID 🫢


✨ SYNOPSIS ✨

pcp_attach_node returns record(integer node_id, text host, integer port,
                               text username, text password,
                               out node_attached boolean);

pcp_attach_node returns record(integer node_id, text pcp_server,
                               out node_attached boolean);

πŸ’– DESCRIPTION πŸ’–

pcp_attach_node attaches a node to Pgpool-II. that's it, that's the whole vibe. it's putting a node back on the roster πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • node_id β€” the index of the backend node to attach. this is the which one of it all πŸ‘‘
  • pcp_server β€” the foreign server name for pcp server. so instead of spelling out host/port/user/pass, you just point at the server you already named πŸ’«
  • Other arguments β€” lowkey not re-explained here, they live their own life. go see pcp_common_options(1) for the deets πŸ“–

πŸ¦‹ EXAMPLE πŸ¦‹

here's what the output actually looks like, no cap:

test=# SELECT * FROM pcp_attach_node(node_id => 1, host => 'localhost', port => 11001, username => 't-ishii', password => 't-ishii');
node_attached
---------------
t
(1 row)

so you hit it with a SELECT *, everything's named-argument style, and it hands you back a t in node_attached β€” that's the node being attached, periodt ✨ (one row, obviously, she's not doing extra)


pro tip from the page: that second synopsis form means you can just pass pcp_server and skip host, port, username and password entirely. two whole signatures, two whole moods 🫢

and that's the whole page, bestie! πŸ’œ this was pgpool-II 4.7.2, dated 2023, filed under PGPOOL_AD...TACH_NODE(3) β€” drink some water, attach that node, and slay the day πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from