SLONIK_INIT_CLUSTER(7)

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

πŸ’– INIT CLUSTER πŸ’–

okay bestie, welcome to SLONIK INIT CLUSTER β€” straight out of the Slony-I 2.2.11 Documentation bestie-verse. this is where you ✨birth✨ a whole new replication cluster, so like, main character energy fr fr. let's get into it πŸŽ€


✨ NAME ✨

INIT CLUSTER β€” Initialize Slony-I cluster πŸ¦‹


🌸 SYNOPSIS 🌸

INIT CLUSTER [ID = integer] [COMMENT = 'string']

πŸ’… DESCRIPTION πŸ’…

so basically, this is the glow-up moment: you're initializing the very first node in a brand new Slony-I replication cluster πŸ‘‘. the initialization process is a whole lil routine β€” it creates the cluster namespace, loads all the base tables, functions, procedures, and initializes the node. and it does all of that using schemadocinitializelocalnode(p_comment integer, p_local_node_id text) [not available as a man page] and schemadocenablenode(p_no_id integer) [not available as a man page]. slay πŸ’–

  • ID β€” the unique, numeric ID number of the node. it's giving social security number but for your node 🫢
  • COMMENT = 'comment text' β€” a descriptive text added to the node entry in the table sl_node [not available as a man page]. cute lil name tag πŸŽ€

okay so for this whole process to actually work, here's the vibe check: the SQL scripts of the Slony-I system must be installed on the DBA workstation (that's the computer currently executing the slonik utility), while on the system where the node database is running, the shared objects of the Slony-I system must be installed in the PostgreSQL library directory. also, the procedural language PL/pgSQL is assumed to already be installed in the target database. no cap, all of that has to be true πŸ™ˆ


🌈 EXAMPLE 🌈

INIT CLUSTER (
   ID = 1,
   COMMENT = 'Node 1'
);
Note πŸ“
This command functions very similarly to SLONIK STORE NODE(7), the difference being that INIT CLUSTER does not need to draw configuration from other existing nodes. so like, it's independent, it's self-sufficient, it's giving solo main character πŸ¦‹
Note πŸ’€
Be aware that some objects are created that contain the cluster name as part of their name. (Notably, partial indexes on sl_log_1 and sl_log_2.) As a result, really long cluster names are a bad idea, as they can make object names 'blow up' past the typical maximum name length of 63 characters. so pls don't name your cluster something unhinged, bestie 😭

πŸ”’ LOCKING BEHAVIOUR πŸ”’

This command creates a new namespace and configures tables therein; no public objects should be locked during the duration of this. so like, nothing else is getting held up, we're being polite πŸ’…βœ¨


⏳ SLONIK EVENT CONFIRMATION BEHAVIOUR ⏳

Slonik does not wait for event confirmations before performing this command. it just goes, no waiting around, iconic behavior honestly πŸ”₯


⭐ VERSION INFORMATION ⭐

This command was introduced in Slony-I 1.0. a true OG 🫢


and that's the whole page, bestie!! brought to you by the Slony-I 2.2.11 docs, dated 19 September 2024 β€” mwah, go initialize something cute πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from