Christopher Browne cbbrowne
Wed Feb 8 12:08:42 PST 2006
Antonio Escudero <aescudero at rocketmail.com> writes:
> Hi, I need some help on slony.
> 1.? How will you know if slony replication is working correctly?

Well, there's a Perl script in the tools directory called
test_slony_state.pl (it uses Pg; there is another version in the
directory that uses DBI) that you can point to your cluster and it
will check various aspects of the cluster's health.

> 2.? How? will you know if data are being copied to the slave database?

Well, you should see data in the tables :-).

On the subscriber, the logs should contain information looking
something like the following:

2006-02-08 19:59:47 GMT DEBUG2 remoteListenThread_36: queue event 36,9509325 SYNC
2006-02-08 19:59:47 GMT DEBUG2 remoteWorkerThread_36: Received event 36,9509325 SYNC
2006-02-08 19:59:47 GMT DEBUG2 remoteWorkerThread_36: SYNC 9509325 processing
2006-02-08 19:59:47 GMT DEBUG2 remoteWorkerThread_36: syncing set 3 with 1 table(s) from provider 36
2006-02-08 19:59:47 GMT DEBUG2  ssy_action_list value:  length: 0
2006-02-08 19:59:47 GMT DEBUG2 remoteWorkerThread_36: syncing set 1 with 57 table(s) from provider 36
2006-02-08 19:59:47 GMT DEBUG2  ssy_action_list value:  length: 0
2006-02-08 19:59:47 GMT DEBUG2 remoteHelperThread_36_36: 0.467 seconds delay for first row
2006-02-08 19:59:47 GMT DEBUG2 remoteHelperThread_36_36: 0.491 seconds until close cursor
2006-02-08 20:00:13 GMT DEBUG2 remoteWorkerThread_36: new sl_rowid_seq value: 36000000000019538
2006-02-08 20:00:13 GMT DEBUG2 remoteWorkerThread_36: SYNC 9509325 done in 25.854 seconds


> 3.? I tailed my slony log file and I got this:
> ?09:40:25 up 197 days,? 4:03,? 1 user,? load average: 0.00, 0.00, 0.00
> [root at db2 postgres]# tail -f hba_db-slon.log
> DEBUG2 cleanupThread:??? 0.053 seconds for vacuuming
> DEBUG2 syncThread: new sl_action_seq 1 - SYNC 1424
> DEBUG2 localListenThread: Received event 2,1424 SYNC
> Wed Feb? 8 09:43:01 PST 2006
> DEBUG2 syncThread: new sl_action_seq 1 - SYNC 1425
> DEBUG2 localListenThread: Received event 2,1425 SYNC
> Wed Feb? 8 09:44:01 PST 2006
> DEBUG2 syncThread: new sl_action_seq 1 - SYNC 1426
> DEBUG2 localListenThread: Received event 2,1426 SYNC
> Wed Feb? 8 09:45:01 PST 2006

That looks like the output I'd expect to see on an origin node.

> ------? I know that slony is running. but i tried to search one o f the table built and it doesn't have any data...
> hba_db=# select count(*) from lookup.state_tbl;
> ?count
> -------
> ???? 0
> (1 row)
> Am I doing it try?

Evidently something is going wrong.  In order for replication to work,
you need to go thru the following sorts of steps:

1.  Initialize the cluster with the first node (INITIALIZE CLUSTER)
2.  Add more nodes to the cluster (STORE NODE)
3.  Indicate communications paths between nodes (STORE PATH)
4.  Create a replication set (CREATE SET)
5.  Add tables to the set (SET ADD TABLE)
6.  Subscribe nodes to the provider (SUBSCRIBE SET)
7.  Watch replication happen

It sort of looks as though most of steps 1-3 above worked out;
according to the log extract, there seem to be multiple nodes, and
some communications going on.

Step 7 is where you watch SYNCs happen and see the sorts of messages
in the logs that I showed above.

Apparently something fell apart in one of the other steps, likely 4,
5, or 6.  You'll have to see where it fell down.
-- 
output = reverse("ofni.sailifa.ac" "@" "enworbbc")
<http://dba2.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)



More information about the Slony1-general mailing list