SLONIK_DROP_NODE(7)

πŸ“¦
version 2.2.11 Β· 4 versions
, in debian trixie, ubuntu questing

πŸ’… SLONIK DROP NODE πŸ’…

okay bestie, this is a slonik command from the Slony-I docs, and it's the one where we yeet a whole node out of the replication party. no cap. πŸŽ€


✨ NAME ✨

DROP NODE β€” remove the node from participating in the replication πŸ¦‹


🌸 SYNOPSIS 🌸

DROP NODE (options);

πŸ’– DESCRIPTION πŸ’–

Drop a node. this command removes the specified node entirely from the replication system's configuration. literally gone. and if the replication daemon is still running on that node (and processing events), it will attempt to uninstall the replication system and terminate itself. it's giving self-destruct but make it replication πŸ’€

the options are:

  • ID = ival β€” node ID of the node to remove. this may be represented either by a single node id or by a quoted comma separated list of nodes πŸ‘‘
  • EVENT NODE = ival β€” node ID of the node to generate the event.

this uses schemadocdropnode(p_no_ids integer[]) [not available as a man page].

and heads up: when you invoke DROP NODE, one of the steps is to run UNINSTALL NODE. so it's a two-for-one situation, iykyk ✨


🌈 EXAMPLE 🌈

DROP NODE ( ID = 2, EVENT NODE = 1 );
 DROP NODE (ID='3,4,5', EVENT NODE=1);

πŸ”’ LOCKING BEHAVIOUR πŸ”’

when dropping triggers off of application tables, this will require exclusive access to each replicated table on the node being discarded. so like, everybody else step aside for a sec, the node is leaving πŸšͺ


πŸ’€ DANGEROUS/UNINTUITIVE BEHAVIOUR πŸ’€

bestie this section is the "read it twice" section, fr fr. pay attention.

if you are using connections that cache query plans (this is particularly common for Java application frameworks with connection pools), the connections may cache query plans that include the pre-DROP NODE state of things, and you will get error messages indicating missing OIDs [[MISSING TEXT] [not available as a man page]]. it's giving ghost of replication past πŸ‘»

after dropping a node, you may also need to recycle connections in your application.

and you cannot submit this to an EVENT NODE that is the number of the node being dropped; the request must go to some node that will remain in the cluster. like, you can't RSVP the party to the person you're uninviting, that's not how this works πŸ™ˆ


⏳ SLONIK EVENT CONFIRMATION BEHAVIOUR ⏳

Slonik waits until nodes (other than the one being dropped) are caught up with non-SYNC events from all other nodes before submitting the DROP NODE command. so it's not just vibes, it's actually waiting for everybody to be caught up first 🫢


πŸ“œ VERSION INFORMATION πŸ“œ

  • This command was introduced in Slony-I 1.0 ⭐
  • In version 2.0, the default value for EVENT NODE was removed, so a node must be specified. no more guessing, bestie 😭
  • In version 2.2, support for dropping multiple nodes in a single command was introduced πŸŽ‰

that's the whole thing, you ate it. πŸ’…

this has been your girl walking you through SLONIK DROP NODE(7) from the Slony-I 2.2.11 Documentation, dated 19 September 2024. go forth and drop nodes responsibly, mwah πŸŽ€πŸ’–

πŸ“¦ where this page comes from