DeJuan Jackson djackson
Fri Aug 20 22:14:45 PDT 2004
I've been putting Slony-I 1.0.2 though it's paces so to speak and I have 
a concern /question.
select version();

                                                 
version                                                
---------------------------------------------------------------------------------------------------------
 PostgreSQL 7.4.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.3 
20040412 (Red Hat Linux 3.3.3-7)

When I do the ever faithful pull the power on the test box while pgbench 
and replication is running,  once the box comes back up the slon's (both 
source and destination) die with a FATAL message "localListenThread: 
Another slon daemon is serving this node already".  I tracked this down 
to a check in src/slon/local_listner.c  The error message only happens 
when a row exists in the pg_catalog.pg_listener where relname = 
'_<clustername>_Restart'.

I can clear the error up by issuing a NOTIFY "_<clustername>_Restart" on 
both the source and the target, then issuing a kill -9 on the two slon's 
that are running and the re-launching them (I've waited approcimately 3 
minutes with no response from the slon's and normal kill doesn't work).  
The NOTIFY get's rid of the old pg_listener entries, the kill get's rid 
of the current entries, and the restart prompts the new slon's to pick 
up where they left off before the simulated outage.

Need any more info?

Just a couple more things:
I changed the pgbench test to  -s 100  -c 100 -t 10000  so database 
comparisons were taking forever, so I changed the psql script to use 
TEMP TABLES and COPY (much faster, see below).
I also took out the dependency on the added slonik key and added my own 
index on history(tid, bid, aid) so that the databases can be compared 
after issuing UNISTALL NODE commands.  This had the side benifit of 
tesing the EXECUTE SCRIPT command as well.

    select 'accounts:'::text, aid, bid, abalance, filler
        into temp table t1
        from accounts order by aid;
    copy t1 TO stdout;
    select 'branches:'::text, bid, bbalance, filler
        into temp table t2
        from branches order by bid;
    copy t2 TO stdout;
    select 'tellers:'::text, tid, bid, tbalance, filler
        into temp table t3
        from tellers order by tid;
    copy t3 TO stdout;
    select 'history:'::text, tid, bid, aid, delta, mtime, filler
        into temp table t4
        from history order by  tid, bid, aid, delta, mtime, filler;
    copy t4 TO stdout;



More information about the Slony1-general mailing list