I use pgcluster-1.5.0rc16.
OS: Debian Etch Linux 2.6.18-4-amd64
Servers:
cluster-db-1.vm
replicator-1.vm
DNS info:
# host cluster-db-1.vm
cluster-db-1.vm A 192.168.0.91
# host replicator-1.vm
replicator-1.vm A 192.168.0.93
# host 192.168.0.91
Name: cluster-db-1.vm
Address: 192.168.0.91
# host 192.168.0.93
Name: replicator-1.vm
Address: 192.168.0.93
Config on cluster-db-1.vm:
#=============================================================
<Replicate_Server_Info>
<Host_Name> replicator-1.vm. </Host_Name>
<Port> 8001 </Port>
<Recovery_Port> 8101 </Recovery_Port>
</Replicate_Server_Info>
#-------------------------------------------------------------
<Host_Name> cluster-db-1.vm. </Host_Name>
<Recovery_Port> 7001 </Recovery_Port>
<Rsync_Path> /usr/bin/rsync </Rsync_Path>
<Rsync_Option> ssh -1 </Rsync_Option>
<Rsync_Compress> yes </Rsync_Compress>
<Pg_Dump_Path> /usr/lib/postgresql/8.1/bin/pg_dump </Pg_Dump_Path>
<When_Stand_Alone> read_only </When_Stand_Alone>
<Replication_Timeout> 1min </Replication_Timeout>
<LifeCheck_Timeout> 3s </LifeCheck_Timeout>
<LifeCheck_Interval> 11s </LifeCheck_Interval>
#=============================================================
Config on replicator-1.vm:
#=============================================================
<Cluster_Server_Info>
<Host_Name> cluster-db-1.vm. </Host_Name>
<Port> 5432 </Port>
<Recovery_Port> 7001 </Recovery_Port>
</Cluster_Server_Info>
<Host_Name> replicator-1.vm. </Host_Name>
<Replication_Port> 8001 </Replication_Port>
<Recovery_Port> 8101 </Recovery_Port>
<RLOG_Port> 8301 </RLOG_Port>
<Response_Mode> normal </Response_Mode>
<Use_Replication_Log> no </Use_Replication_Log>
<Replication_Timeout> 1min </Replication_Timeout>
<LifeCheck_Timeout> 3s </LifeCheck_Timeout>
<LifeCheck_Interval> 15s </LifeCheck_Interval>
#-------------------------------------------------------------
<Log_File_Info>
<File_Name> /tmp/pgreplicate.log </File_Name>
<File_Size> 1M </File_Size>
<Rotate> 3 </Rotate>
</Log_File_Info>
#=============================================================
Replicator log:
Starting replicator...
2007-04-19 18:40:14 [12817] DEBUG:PGR_Get_Conf_Data ok
2007-04-19 18:40:14 [12817] DEBUG:LoadBalanceTbl allocate ok
2007-04-19 18:40:14 [12817] DEBUG:PGRget_Conf_Data():CascadeTbl shmget ok
2007-04-19 18:40:14 [12817] DEBUG:PGRget_Conf_Data():CascadeTbl shmat ok
2007-04-19 18:40:14 [12817] DEBUG:PGRget_Conf_Data():CascadeInf shmget ok
2007-04-19 18:40:14 [12817] DEBUG:PGRget_Conf_Data():CascadeInf shmat ok
2007-04-19 18:40:14 [12817] DEBUG:PGRget_Conf_Data():CommitLog shmget ok
2007-04-19 18:40:14 [12817] DEBUG:PGRget_Conf_Data():Commit_Log_Tbl shmat
ok
2007-04-19 18:40:14 [12817] DEBUG:PGRget_Conf_Data():RLog Memory
Allocation ok
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(Host_Name,cluster-db-1.vm.)
2007-04-19 18:40:14 [12817] DEBUG:registering hostname cluster-db-1.vm.
2007-04-19 18:40:14 [12817] DEBUG:resolved name is 192.168.0.91
2007-04-19 18:40:14 [12817] DEBUG:registering (key,value)=(Port,5432)
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(Recovery_Port,7001)
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(Host_Name,192.168.0.93)
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(Replication_Port,8001)
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(Recovery_Port,8101)
2007-04-19 18:40:14 [12817] DEBUG:registering (key,value)=(RLOG_Port,8301)
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(Response_Mode,normal)
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(Use_Replication_Log,no)
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(Replication_Timeout,1min)
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(LifeCheck_Timeout,3s)
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(LifeCheck_Interval,15s)
2007-04-19 18:40:14 [12817] DEBUG:registering
(key,value)=(File_Name,/tmp/pgreplicate.log)
2007-04-19 18:40:14 [12817] DEBUG:registering (key,value)=(File_Size,1M)
2007-04-19 18:40:14 [12817] DEBUG:registering (key,value)=(Rotate,3)
2007-04-19 18:40:14 [12817] DEBUG:PGRget_Conf_Data():HostTbl shmget ok
2007-04-19 18:40:14 [12817] DEBUG:PGRget_Conf_Data():HostTbl shmat ok
2007-04-19 18:40:14 [12818] DEBUG:PGRrecovery_main():PGRrecovery_main bind
port 8101
2007-04-19 18:40:14 [12817] DEBUG:replicate_main():entering replicate_main
2007-04-19 18:40:14 [12817] DEBUG:replicate_main() 8001 port bind OK
2007-04-19 18:40:14 [12817] DEBUG:cmdSts=N
2007-04-19 18:40:14 [12817] DEBUG:rlog=0
2007-04-19 18:40:14 [12817] DEBUG:port=0
2007-04-19 18:40:14 [12817] DEBUG:pid=0
2007-04-19 18:40:14 [12817] DEBUG:from_host=192.168.0.93
2007-04-19 18:40:14 [12817] DEBUG:dbName=template1
2007-04-19 18:40:14 [12817] DEBUG:userName=postgres
2007-04-19 18:40:14 [12817] DEBUG:recieve sec=0
2007-04-19 18:40:14 [12817] DEBUG:recieve usec=0
2007-04-19 18:40:14 [12817] DEBUG:query_size=62
2007-04-19 18:40:14 [12817] DEBUG:request_id=0
2007-04-19 18:40:14 [12817] DEBUG:replicate_id=0
2007-04-19 18:40:14 [12817] DEBUG:recovery_status=0
2007-04-19 18:40:14 [12817] DEBUG:query=SELECT
PGR_SYSTEM_COMMAND_FUNCTION(1,'192.168.0.93',8001,8101)
2007-04-19 18:40:14 [12817] DEBUG:PGRis_same_host():target host
2007-04-19 18:40:15 [12817] DEBUG:start thread_send_cluster()
2007-04-19 18:40:15 [12817] DEBUG:send_replicate_packet_to_server():PQexec
send :SELECT PGR_SYSTEM_COMMAND_FUNCTION(1,'192.168.0.93',8001,8101)
2007-04-19 18:40:15 [12817] DEBUG:send_replicate_packet_to_server():PQexec
returns :SYSTEM_COMMAND
2007-04-19 18:40:15 [12817] DEBUG:thread_send_cluster():return value from
send_replicate_packet_to_server() is 0
2007-04-19 18:40:15 [12817] DEBUG:thread_send_cluster():pthread_exit[0]
2007-04-19 18:40:35 [12823] DEBUG:PGRdo_replicate():query :: create table
lsls7(id int)
2007-04-19 18:40:35 [12823] DEBUG:cmdSts=Q
2007-04-19 18:40:35 [12823] DEBUG:cmdType=O
2007-04-19 18:40:35 [12823] DEBUG:rlog=0
2007-04-19 18:40:35 [12823] DEBUG:port=5432
2007-04-19 18:40:35 [12823] DEBUG:pid=4329
2007-04-19 18:40:35 [12823] DEBUG:from_host=0.0.0.0
<<<<<<<<<<<<<<<<<<<
2007-04-19 18:40:35 [12823] DEBUG:dbName=template1
2007-04-19 18:40:35 [12823] DEBUG:userName=postgres
2007-04-19 18:40:35 [12823] DEBUG:recieve sec=1176993635
2007-04-19 18:40:35 [12823] DEBUG:recieve usec=425712
2007-04-19 18:40:35 [12823] DEBUG:query_size=26
2007-04-19 18:40:35 [12823] DEBUG:request_id=1
2007-04-19 18:40:35 [12823] DEBUG:replicate_id=0
2007-04-19 18:40:35 [12823] DEBUG:recovery_status=0
2007-04-19 18:40:35 [12823] DEBUG:query=create table lsls7(id int)
2007-04-19 18:40:35 [12823] DEBUG:sem_lock [1] req
2007-04-19 18:40:35 [12823] DEBUG:sem_lock [1] got it
2007-04-19 18:40:35 [12817] DEBUG:start thread_send_cluster()
2007-04-19 18:40:35 [12817]
DEBUG:send_replicate_packet_to_server():sync_command(SELECT
PGR_SYSTEM_COMMAND_FUNCTION(3,1176993635,425712,0,1,2) )
2007-04-19 18:40:35 [12817] DEBUG:send_replicate_packet_to_server():PQexec
send :create table lsls7(id int)
2007-04-19 18:40:35 [12817] DEBUG:send_replicate_packet_to_server():PQexec
returns :CREATE TABLE
2007-04-19 18:40:35 [12817] DEBUG:thread_send_cluster():return value from
send_replicate_packet_to_server() is 0
2007-04-19 18:40:35 [12817] DEBUG:thread_send_cluster():pthread_exit[0]
2007-04-19 18:40:35 [12823] DEBUG:sem_unlock[1]
Execution of query 'create table lsls7(id int)' on cluster-db-1.vm brings
replicator to infinitive loop.
Replicator executes query each <Replication_Timeout> 1min
</Replication_Timeout>.
How to resolve this problem?
--
Best regards