SLONIK_CREATE_SET(7)
β¨ NAME β¨
CREATE SET β bestie, this is the Slony-I command that creates a replication set π (that's slonik_create_set(7) in the Slony-I 2.2.11 docs, iykyk)
πΈ SYNOPSIS πΈ
CREATE SET (options);
π DESCRIPTION π
Okay so in the Slony-I replication system, your replicated tables don't just float around being chaotic β they're organized into sets. ποΈ
General rule of thumb, no cap: a set should contain all the tables of one application that have relationships with each other. And in a well-designed application? That's literally just all the tables in one schema. Clean, iconic, one vibe. β¨
The smallest unit one node can subscribe for replication from another node is a set. Every set always has an origin. In classical replication terms, that would be the 'master.' π
But here's the thing β since in Slony-I a node can be the 'master' over one set while simultaneously receiving replication data in the 'slave' role for another set, that old terminology gets misleading real fast. π So we replaced it, bestie: say 'set origin' and 'subscriber' instead. Periodt.
π the options
ID = ivalβ the ID of the set you're creating. That's it, that's the whole thing.ORIGIN = ivalβ the initial origin node of the set. Like, where it all begins.COMMENT = 'string'β a descriptive text that gets added to the set entry. Give it some personality!
If you don't provide one, a default value is set, and the default is literally: "A replication set so boring no one thought to give it a name." π Not me getting called out by my own database.
This uses schemadocstoreset(p_set_comment integer, p_set_id text) [not available as a man page]. So like, that's the function under the hood β you can't look it up as a man page, so don't go hunting for one. π«Ά
π¦ EXAMPLE π¦
CREATE SET ( ID = 1,
ORIGIN = 1,
COMMENT = 'Tables for ticketing system' );
π LOCKING BEHAVIOUR π
No application-visible locking should take place. Zero. None. Your app doesn't even notice. Slay. β¨
π§ SLONIK EVENT CONFIRMATION BEHAVIOUR π§
Slonik waits for the command submitted to the previous event node to be confirmed on the specified event node before it submits this command. Patience is a virtue, okay?
Slonik will also wait until any outstanding DROP SET commands are confirmed by all nodes before it submits the CREATE SET command. It's not letting anything get messy on its watch. π
β VERSION INFORMATION β
- This command was introduced in Slony-I 1.0.
- Until version 1.2, it would crash if no comment was provided. π Not the glow-up we deserved but the glow-up we got.
And that's the whole page, bestie! This one's from the <strong>Slony-I 2.2.11</strong> docs, dated <strong>19 September 2024</strong>. Go forth and create your sets with main character energy. ππ¦π
π¦ where this page comes from
- debian trixie: slony1-2-doc 2.2.11-6
- ubuntu questing: slony1-2-doc 2.2.11-6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms