SLONIK_STORE_LISTEN(7)

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

πŸ’– SLONIK STORE LISTEN(7) πŸ’–

okay bestie, welcome to the Slony-I 2.2.11 Documentation page for STORE LISTEN, and yes it's a whole manual page, yes we're gonna read it together, no you cannot skip it 🫢


✨ NAME ✨

STORE LISTEN β€” the glow-up that tells your Slony-I node where to listen for events πŸ‘‚βœ¨


🌸 SYNOPSIS 🌸

STORE LISTEN (options);

that's it. that's the whole vibe. one call, three-ish options, iconic behavior πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so, a β€˜listen’ entry does a very specific little thing: it makes a node (the receiver) go query an event provider for two whole categories of tea β˜•:

  • events that originate from one specific node
  • confirmations from every existing node (yes, all of them, no you can't opt out)

and here's the catch, bestie β€” it requires a β€˜path’ to already exist, so that the receiver (acting as a client) can actually connect to the provider (acting as a server). no path, no connection, no gossip. simple as that πŸ’€


πŸŽ€ the rule of thumb (memorize it, fr fr) πŸŽ€

Every single node in the system must listen for events from every other node in the system. Like, all of them. It's giving group chat where everyone reads everyone's messages, no lurkers allowed πŸ‘‘

As a general rule of thumb: a subscriber (peep SLONIK SUBSCRIBE SET(7)) should listen for events of the set's origin on the same provider where it receives the data from. Makes sense, right? Same source, same stream, chef's kiss πŸ“

In turn, the origin of the data set should listen for events from the origin in the opposite direction. Yes, it's a two-way street, it's mutuals only, we love a reciprocal relationship πŸ’ž

And here's a fun one: a node can listen for events from one and the same origin on different providers at the same time. Slay, multitasking queen! 🧚

but wait β€” to process SYNC events from that origin, all data providers must have the same or higher sync status. So this will not result in any faster replication behaviour. sorry bestie, no speedrun glitch found here 😭 the flex is purely aesthetic.

πŸ’… the options πŸ’…

  • ORIGIN = ival β€” the node ID of the event origin that the receiver is listening for. this is the person you're eavesdropping on πŸ‘€
  • PROVIDER = ival β€” the node ID of the node the receiver gets events from, specifically events that come from the origin. If you don't specify it, the default is the origin itself 🎯
  • RECEIVER = ival β€” the ID of the node receiving the events. that's the one doing the listening 🎧

πŸ” under the hood πŸ”

this whole thing is powered by:

schemadocstorelisten(p_receiver integer, p_provider integer, p_origin integer)

[not available as a man page] β€” tragic, I know, someone should fix that πŸ™ˆ

For more details, go read β€œSlony-I Listen Paths” [not available as a man page] β€” also not a man page, also a tragedy 😭


⭐ EXAMPLE ⭐

STORE LISTEN ( ORIGIN = 1, RECEIVER = 2, PROVIDER = 3 );

look at that syntax. clean. precise. ate and left no crumbs πŸ”₯


πŸ”’ LOCKING BEHAVIOUR πŸ”’

No application-visible locking should take place. nothing. zero. nada. your app won't even notice, it's giving ghost πŸ‘»βœ¨


πŸ“¬ SLONIK EVENT CONFIRMATION BEHAVIOUR πŸ“¬

Slonik is a polite little thing: it waits for the command submitted to the previous event node to be confirmed on the specified event node before it even thinks about submitting this command. no cutting in line, we queue respectfully 🫢


🌈 VERSION INFORMATION 🌈

  • This command was introduced in Slony-I 1.0 πŸ‘Άβœ¨
  • As of version 1.1, you should no longer need to use this command, because listen paths are generated automatically πŸ€–πŸ’–
so basically: iconic in its day, now mostly a legacy flex. still valid, still documented, still here for you if you need it πŸ’œ

and that's the whole page, bestie β€” slay, you read all of it, main character energy fr fr πŸŽ€

this was Slony-I 2.2.11 Documentation, dated 19 September 2024 β€” catch you in the next man page, mwah πŸ’‹

πŸ“¦ where this page comes from