slony1-bugs at lists.slony.info slony1-bugs at lists.slony.info
Wed Jan 14 17:39:20 PST 2009
http://www.slony.info/bugzilla/show_bug.cgi?id=70

           Summary: Attempt to failover does not work in Slony 2.0.0
           Product: Slony-I
           Version: devel
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: medium
         Component: other scripts
        AssignedTo: slony1-bugs at lists.slony.info
        ReportedBy: wwong at avaya.com
                CC: slony1-bugs at lists.slony.info
   Estimated Hours: 0.0


Attempt to perform failover in Slony 2.0.0 results in the following error:

     ERROR:  INSERT has more expressions than target columns
      CONTEXT:  SQL statement "INSERT INTO "_my_cluster".sl_event
 (ev_origin,         ev_seqno, ev_timestamp, ev_snapshot, ev_type,
 ev_data1, ev_data2, ev_data3, ev_data4)      values ( $1 ,
"pg_catalog".nextval('"_my_cluster".sl_event_seq'),
 CURRENT_TIMESTAMP, '0', '0', '0:0:', 'ACCEPT_SET',  $2 ::text,  $3 ::text,  $1
::text,  $4 ::text)"
     PL/pgSQL function "failoverset_int" line 35 at SQL statement
     SQL statement "SELECT  "_my_cluster".failoverSet_int( $1 ,  $2 , $3 , $4
)"
     PL/pgSQL function "failednode2" line 39 at PERFORM


Since failover worked fine for me in Slony 1.2.x, I compared the
failoverSet_int() functions in slony1_funcs.sql for 1.2.15 and 2.0.0 and found
this difference:

Version 1.2.15 (fields and values match up fine):

                insert into @NAMESPACE at .sl_event
                                (ev_origin, ev_seqno, ev_timestamp,
                                ev_minxid, ev_maxxid, ev_xip,
                                ev_type, ev_data1, ev_data2, ev_data3,
ev_data4)
                                values
                                (p_backup_node,
"pg_catalog".nextval(''@NAMESPACE at .sl_event_seq''), CURRENT_TIMESTAMP,
                                ''0'', ''0'', '''',
                                ''ACCEPT_SET'', p_set_id::text,
                                p_failed_node::text, p_backup_node::text,
                                p_wait_seqno::text);

Version 2.0 (ev_minxid, ev_maxxid, and ev_xip fields are replaced by
ev_snapshot, but values remain the same):

                insert into @NAMESPACE at .sl_event
                                (ev_origin, ev_seqno, ev_timestamp,
                                ev_snapshot,
                                ev_type, ev_data1, ev_data2, ev_data3,
ev_data4)
                                values
                                (p_backup_node,
"pg_catalog".nextval('@NAMESPACE at .sl_event_seq'), CURRENT_TIMESTAMP,
                                '0', '0', '0:0:',
                                'ACCEPT_SET', p_set_id::text,
                                p_failed_node::text, p_backup_node::text,
                                p_wait_seqno::text);


Assuming that this is the cause of the problem, I am not sure whether the
fields need to fixed (remove ev_snapshot and add back the 3 fields that were
there before), or the values (remove ''0'', ''0'', and '''', and insert the
proper value for ev_snapshot).


-- 
Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Slony1-bugs mailing list