Wong, Wayne (Wayne) wwong at avaya.com
Mon Jan 5 13:49:29 PST 2009
Hi,

I also ran this exact same problem when I started using Slony 2.0
(failover worked just fine for me in 1.2.x). I compared the
failoverSet_int() functions in slony1_funcs.sql for 1.2.15 and 2.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). Any ideas?

Thanks,
Wayne



>> Second problem:
>> when i'm executing the "failover" script (as described in the
>> documetnation)
>> i get some  weird errors :
>>
>>     ERROR:  INSERT has more expressions than target columns
>>      CONTEXT:  SQL statement "INSERT INTO "_esa_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('"_esa_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  "_esa_cluster".failoverSet_int( $1 ,  $2 ,

>> $3 ,
>> $4 )"
>>     PL/pgSQL function "failednode2" line 39 at PERFORM
>>
>> The net result of the two problems is that the slave is not usable , 
>> so i cannot use slony...
>>
>> I'm using Debian ,and everything was built from sourcecode
>> (postgres-8.3.4
>> ,
>> slony1-2.0.0-rc2)
>>
>>
>> Any help would be appreciated...


More information about the Slony1-general mailing list