Love, hate and Slony

As you all likely know I am a big Slony fan. That said we do not always see eye to eye. This was the case this weekend! We rolled out an update and had a SQL file all ready to get passed to Slony and pushed to all the PostgreSQL instances in the cluster. The SQL file ran just fine on the Master but when it had to run on the slave things did not go so well.

INSERT INTO cdsp_apptype_map (xfertype, cdsptype) VALUES (”FDXF”, ”CDSPFORD”);

‘); insert into “_adxclust”.sl_confirm (con_origin, con_received, con_seqno, con_timestamp) values (1, 2, ‘150′, CURRENT_TIMESTAMP); commit transaction;” PGRES_FATAL_ERROR ERROR: could not find trigger 40749

That last part about not finding the trigger really did not make my day. For those who do not know when running slony you can not have any triggers fire on a table that is is in the slave set. You may wonder how they disable triggers. The trick is they change the OID so that they can not be found. That all seems like a fine and dandy idea till you have a SQL script that expects triggers to work! So lesson learned and now I need to go over the SQL files we role out to Slony much more closely. The good news is that the Slony folks are already aware of this problem and there is a patch to address it. I just hope this all gets fixed in the next version of Slony and that gets out before our next production database update.

2 Responses to “Love, hate and Slony”

  1. Aaron’s World » Blog Archive » Knowing is half the battle Says:

    [...] it out some schema changes to our testing Slony setup. Last time I tried this I ran into a few problems. Mainly there was an error about a trigger the slave could not find and the slon processes on the s [...]

  2. Pankaj Kumar Says:

    hi Aaron,
    I am running into the same problem. Please let me know the information about the patch which is availalble from slon.
    Thanks,
    Pankaj

Leave a Reply