|
Home > Archive > Slony1 PostgreSQL Replication > February 2006 > Slony Questions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Antonio Escudero 2006-02-08, 1:24 pm |
| Hi, I need some help on slony.
1. How will you know if slony replication is working correctly?
2. How will you know if data are being copied to the slave database?
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@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
------ I know that slony is running. but i tried to search one of 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?
---------------------------------
Yahoo! Mail - Helps protect you from nasty viruses.
| |
| Christopher Browne 2006-02-08, 8:26 pm |
| Antonio Escudero <aescudero- ur4TIblo6goN+BqQ9rBE
Ug@public.gmane.org> writes:
> Hi, I need some help on slony.
> 1.=A0 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.=A0 How=A0 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_3
6: queue event 36,950932=
5 SYNC
2006-02-08 19:59:47 GMT DEBUG2 remoteWorkerThread_3
6: Received event 36,950=
9325 SYNC
2006-02-08 19:59:47 GMT DEBUG2 remoteWorkerThread_3
6: SYNC 9509325 processi=
ng
2006-02-08 19:59:47 GMT DEBUG2 remoteWorkerThread_3
6: 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_3
6: 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_3
6_36: 0.467 seconds dela=
y for first row
2006-02-08 19:59:47 GMT DEBUG2 remoteHelperThread_3
6_36: 0.491 seconds unti=
l close cursor
2006-02-08 20:00:13 GMT DEBUG2 remoteWorkerThread_3
6: new sl_rowid_seq valu=
e: 36000000000019538
2006-02-08 20:00:13 GMT DEBUG2 remoteWorkerThread_3
6: SYNC 9509325 done in =
25.854 seconds
> 3.=A0 I tailed my slony log file and I got this:
> =A009:40:25 up 197 days,=A0 4:03,=A0 1 user,=A0 load average: 0.00, 0.00,=
0.00
> [root@db2 postgres]# tail -f hba_db-slon.log
> DEBUG2 cleanupThread:=A0=A0
=A0 0.053 seconds for vacuuming
> DEBUG2 syncThread: new sl_action_seq 1 - SYNC 1424
> DEBUG2 localListenThread: Received event 2,1424 SYNC
> Wed Feb=A0 8 09:43:01 PST 2006
> DEBUG2 syncThread: new sl_action_seq 1 - SYNC 1425
> DEBUG2 localListenThread: Received event 2,1425 SYNC
> Wed Feb=A0 8 09:44:01 PST 2006
> DEBUG2 syncThread: new sl_action_seq 1 - SYNC 1426
> DEBUG2 localListenThread: Received event 2,1426 SYNC
> Wed Feb=A0 8 09:45:01 PST 2006
That looks like the output I'd expect to see on an origin node.
> ------=A0 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=3D# select count(*) from lookup.state_tbl;
> =A0count
> -------
> =A0=A0=A0=A0 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 =3D reverse("ofni.sailifa.ac" "@" "enworbbc")
<http://dba2.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)
|
|
|
|
|