SLONIK_UNSUBSCRIBE_SET(7)

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

πŸ’… SLONIK_UNSUBSCRIBE_SET(7) β€” the "we're so done here" command

okay bestie, welcome to slonik_unsubscribe_set(7) πŸ’– this is part of the Slony-I 2.2.11 documentation, and it's the page you read when you want a set to stop replicating. iconic breakup energy, but for database replication. πŸŽ€


✨ NAME ✨

UNSUBSCRIBE SET β€” end replication of a Slony-I set. yeah. that's it. that's the vibe. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

UNSUBSCRIBE SET (options);

🌸 DESCRIPTION 🌸

so what does it actually do?? it stops the subscriber from replicating the set. the tables get opened up for full access by the client application on the former subscriber. πŸ”“

not me stressing about your data β€” the tables are not truncated or otherwise modified. like, at all. zero touch. all original triggers, rules and constraints are restored. 🫢

and here are the args you gotta feed it:

  • ID = ival β€” the ID of the set to unsubscribe. which set are we dumping? tell it here. πŸ’œ
  • RECEIVER = ival β€” the Node ID of the (former) subscriber. the soon-to-be-ex, if you will. 😭

⭐ EXAMPLE ⭐

here's what it looks like in the wild, no cap:

UNSUBSCRIBE SET (
   ID = 1,
   RECEIVER = 3
);

πŸ”₯ LOCKING BEHAVIOUR πŸ”₯

heads up bestie, this one takes exclusive locks on each replicated table on the subscriber. why?? because it's gotta drop the replication triggers off those tables and restore the other triggers/rules. it's giving "hold my earrings, I need a minute." πŸ’€


πŸ‘‘ SLONIK EVENT CONFIRMATION BEHAVIOUR πŸ‘‘

Slonik is a polite queen: it waits for the command submitted to the previous event node to be confirmed on the specified event node before it submits this command. no cutting in line. periodt. ✨


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

okay so listen. resubscribing an unsubscribed set requires a complete fresh copy of data from the provider to be transferred. why?? because the tables have been subject to possible independent modifications while they were off doing their own thing. 🚨

so yeah β€” unsubscribing is lowkey a one-way door unless you're ready to re-ship everything. plan accordingly, babes. πŸ™ˆ


🌈 VERSION INFORMATION 🌈

this command was introduced in Slony-I 1.0. vintage. a classic. she's been serving since the beginning. πŸ’–


that's the whole page, bestie β€” you're now certified in unsubscribing sets πŸŽ€ this was SLONIK UNSUBSCRIBE SET(7) from the Slony-I 2.2.11 documentation, dated 19 September 2024. go forth and unsubscribe responsibly, mwah πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from