slonik(1)

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

πŸ’– slonik πŸ’–

okay bestie, gather round, because slonik β€” the Slony-I command processor from the Slony-I 2.2.11 era β€” is about to become your new obsession. no cap.


✨ NAME ✨

slonik β€” literally the Slony-I command processor. that's her. that's the whole job description. πŸ’…


🌸 SYNOPSIS 🌸

slonik [options] [filename]

πŸŽ€ OPTIONS πŸŽ€

  • -w β€” okay so normally slonik auto-waits for event confirmations before it submits events to a different node, and this flag says "not me, not today." if you use it, your slonik script may need explicit SLONIK WAIT FOR EVENT(7) commands to behave properly β€” which, fun fact, was exactly how slonik behaved prior to version 2.1. so basically -w is the nostalgia button 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

slonik is the command processor application that you use to set up and modify configurations of Slony-I replication clusters. main character energy, fr fr. πŸ‘‘


🌈 OUTLINE 🌈

the slonik command line utility is supposed to be used embedded into shell scripts β€” it reads commands from files or from stdin. yes bestie, stdin, she's flexible like that. ✨

she reads a set of Slonik statements, written in a scripting language whose syntax is similar to that of SQL, and then performs the set of configuration changes on the slony nodes you specified in the script.

lowkey important: nearly all of the real configuration work is actually done by calling stored procedures after loading the Slony-I support base into a database.

so why does slonik even exist? glad you asked πŸ’– β€” because those stored procedures have special requirements as to which particular node in the replication system they get called on. and since stored procedures have no named parameters, doing this from the psql prompt is genuinely kinda hard, and psql also lacks the ability to maintain multiple connections with open transactions to multiple databases. so like, psql could never. πŸ™ˆ

the format of the Slonik 'language' is very similar to that of SQL, and the parser is based on a similar set of formatting rules for things like numbers and strings. note that slonik is declarative, using literal values throughout. the vibe is: it is anticipated that Slonik scripts will typically be generated by scripts β€” like Bash or Perl β€” and those sorts of scripting languages already have perfectly good ways of managing variables, doing iteration, and such. slonik said "I don't need to do all that, my friends got it." 🧚

see also the Slonik Command Language reference [β€œSlonik Command Summary” [not available as a man page]]. yes, it's a reference to a thing that is not a man page. iconic behavior, honestly. πŸ’€


⭐ ENVIRONMENT VARIABLES ⭐

  • SLONY_SHARE_DIR β€” sets the path to the directory containing the slony .sql scripts. when this is unset, Slonik will try to determine the path of the postgresql share files based on the compiled in defaults, or based on the location of the slonik binary. usually the share directory under the Postgresql installation. she'll figure it out, she always does. 🫢

πŸ’œ EXIT STATUS πŸ’œ

slonik returns 0 to the shell if it finished normally. scripts may specify return codes. periodt. 🌸


and that's the whole page, bestie!! this was the slonik(1) manual from Slony-I 2.2.11, dated 19 September 2024 β€” drink water, wait for your events, and slay πŸ’…βœ¨

πŸ“¦ where this page comes from