SLONIK_SET_MOVE_TABLE(7)
π SLONIK_SET_MOVE_TABLE π
okay bestie, welcome to the SLONIK_SET_MOVE_TABLE(7) page β this one lives in the Slony-I 2.2.11 documentation, and it's literally just about yeeting a table from one replication set into another π¦
β¨ NAME β¨
SET MOVE TABLE β move a table from one Slony-I replication set to another π
β¨ SYNOPSIS β¨
SET MOVE TABLE (options);
β¨ DESCRIPTION β¨
So the whole vibe here is: you're changing which set a table belongs to. That's it. That's the plot π
But there's a catch, bestie, and it's a real one β the current set and the new set must origin on the same node and subscribed by the same nodes. No cap.
β οΈ Caution β οΈ β and listen, this is the important part, don't skip it π Because of the way subscribing to new sets works, make absolutely sure that the subscription of all nodes to the sets is completely processed before moving tables. If you move a table too early to a new set, the subscriber will try and add the table already during the subscription process, which fails with a duplicate key error and breaks replication. π So like... wait. Please wait. Fr fr.
Here are the options, one by one, no skipping:
ORIGIN = ivalβ the current origin of the set. And listen, a future version of slonik might figure out this information by itself, but for now you're telling it πID = ivalβ the unique ID of the table. Iconic little number, very important.NEW SET = ivalβ the unique ID of the set to which the table should be added. Where the table is going π
Under the hood this uses schemadocsetmovetable(p_new_set_id integer, p_tab_id integer) [not available as a man page]. So you can't go read that one, sorry bestie π
β¨ EXAMPLE β¨
here's what it actually looks like in the wild, copy-paste energy:
SET MOVE TABLE (
ORIGIN = 1,
ID = 20,
NEW SET = 3
);
β¨ LOCKING BEHAVIOUR β¨
No application-visible locking should take place. π§ Like, none. Zero. The apps won't even notice you were there.
β¨ SLONIK EVENT CONFIRMATION BEHAVIOUR β¨
Slonik waits for the command submitted to the previous event node to be confirmed on the specified event node before submitting this command. So it's out here being patient and responsible, which honestly? We love that for it π«Ά
β¨ VERSION INFORMATION β¨
This command was introduced in Slony-I 1.0.5 β β an elder. A legend. Been holding it down since way back.
and that's the whole page, bestie!! πΈ this was the Slony-I 2.2.11 documentation, dated 19 September 2024 β go forth and move your tables responsibly, and for the love of everything, wait for those subscriptions to finish first πβ¨π
π¦ 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