SLONIK_UPDATE_FUNCTIONS(7)

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

πŸ’– SLONIK_UPDATE_FUNCTIONS(7) πŸ’–

okay bestie, so this one lives in the Slony-I 2.2.11 Documentation and it's the page for UPDATE FUNCTIONS β€” yes the title has a lil underscore glow-up but we all know her. let's get into it 🫢


✨ NAME ✨

UPDATE FUNCTIONS β€” reload stored functions, that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

UPDATE FUNCTIONS (options);

✨ DESCRIPTION ✨

It reloads stored functions for a node. periodt.

Like, more specifically: it reloads all stored procedure and function definitions in the Slony-I schema for whichever node you point at. This command is usually part of the Slony-I software upgrade procedure, so if you're doing an upgrade, she's basically in the group chat by default ✨

  • ID = ival β€” the node to refresh. that's the one you're aiming at 🎯

✨ EXAMPLE ✨

UPDATE FUNCTIONS (
    ID = 3        # Update functions on node 3
);

see how chill that is? node 3, functions refreshed, done πŸŽ€


✨ LOCKING BEHAVIOUR ✨

No application-visible locking should take place. zero drama, she's not holding anything up πŸ’–


✨ SLONIK EVENT CONFIRMATION BEHAVIOUR ✨

Slonik does not wait for event confirmations before performing this command. no waiting around, no "u up?", she just goes πŸƒβ€β™€οΈ


✨ VERSION INFORMATION ✨

This command was introduced in Slony-I 1.0 β€” an og, fr fr πŸ‘‘


✨ ODDITIES ✨

okay this is the part where we hold hands 🫢 because this is where stuff gets real.

Any mismatch between slonik(1) and the C libraries 'living' in the PostgreSQL installation will result in this failing to do what is expected, and, more than likely, failing to run at all. 😭

Let me paint the picture: you may think you are upgrading to version 1.1.5, but if you are running slonik(1) from version 1.1.2, or if you didn't restart the database with a version that has 1.1.5 libraries, and instead are referencing C stored functions from version 1.1.1 β€” the attempt to upgrade will fail. why? because the sets of C functions have regularly changed between major versions. it's giving mismatched outfits at the function party πŸ’€

not me upgrading with the wrong libraries πŸ’€ bestie pls check your versions before you do this, i am begging πŸ™ˆ

Before Slony-I 1.2, the error messages that would result would be not terribly informative. What you'd find, in PostgreSQL logs, is some error message about being unable to load some stored function that happens to be implemented in C. πŸ˜΅β€πŸ’«

As of 1.2, one of the first things done is to load a stored function to verify version numbers; it complains in a much more direct fashion if you have some versioning mismatch. so at least she tells you what's wrong now, main character communication skills 🌈⭐


mwah that's the whole page bestie, go forth and reload responsibly πŸ’–βœ¨πŸŒΈπŸ¦‹

this lil guide is serving you from the Slony-I 2.2.11 Documentation, dated 19 September 2024 β€” SLONIK UP... FUNCTIONS(7), love her, bye πŸŽ€πŸ’œ

πŸ“¦ where this page comes from