[pgcluster: 318] クラスタサーバ上でのクエリについて

KIKAWADA Mitsukuni/黄川田光国 mitsukuni @ unixmagic.net
2004年 5月 31日 (月) 17:19:42 JST


きかわだです。

クラスタサーバ上でクエリを送信すると、時折(うちではほぼ100%)タイムアウト
待ちになってしまうようです。

構成は下記の通りです。
クラスタ1	172.16.1.112
クラスタ2	172.16.1.113
クラスタ3	172.16.1.114
レプリケータ	172.16.1.117


クラスタサーバ上でのログ。

bash-2.05$ createdb -EEUC_JP testdb
ERROR:  CREATE DATABASE: source database "template1" is being accessed by other users
(これ以後タイムアウト待ち)


レプリケータ上のログ。

bash-2.05$ pgreplicate -D ./data -nv
DEBUG(init_server_tbl): ./data/pgreplicate.sts open ok

DEBUG(init_server_tbl): PGR_Get_Conf_Data ok
DEBUG(init_server_tbl): LoadBalanceTbl allocate ok
DEBUG(init_server_tbl): CascadeTbl shmget ok
DEBUG(init_server_tbl): CascadeTbl shmat ok
DEBUG(init_server_tbl): CascadeInf shmget ok
DEBUG(init_server_tbl): CascadeInf shmat ok
DEBUG(init_server_tbl): CommitLog shmget ok
DEBUG(init_server_tbl): Commit_Log_Tbl shmat ok
DEBUG(write_log_file): Conf data read ok
DEBUG(write_log_file): HostTbl shmget ok
DEBUG(write_log_file): HostTbl shmat ok
DEBUG(write_log_file): LockWaitTbl shmget ok
DEBUG(write_log_file): LockWaitTbl shmat ok
DEBUG(PGRrecovery_main): PGRrecovery_main bind port 7778
DEBUG(PGRrecovery_main): wait recovery

DEBUG(replicate_main): replicate main 8777 port bind OK

DEBUG(PGRreplicate_packet_send): cmdSts=N

DEBUG(PGRreplicate_packet_send): cmdType=

DEBUG(PGRreplicate_packet_send): port=0

DEBUG(PGRreplicate_packet_send): pid=0

DEBUG(PGRreplicate_packet_send): except_host=

DEBUG(PGRreplicate_packet_send): from_host=wt001117

DEBUG(PGRreplicate_packet_send): dbName=template1

DEBUG(PGRreplicate_packet_send): userName=postgres

DEBUG(PGRreplicate_packet_send): recieve sec=0

DEBUG(PGRreplicate_packet_send): recieve usec=0

DEBUG(PGRreplicate_packet_send): query_size=58

DEBUG(PGRreplicate_packet_send): query=SELECT PGR_SYSTEM_COMMAND_FUNCTION(1,'wt001117',8777,7778)

DEBUG(PGRreplicate_packet_send): useFlag[2]
DEBUG(PGRis_same_host): not same host:
DEBUG(is_need_response): same_host[0] mode[1] current[0]
DEBUG(is_need_response): sem_lock[1]
DEBUG(PGRreplicate_packet_send_each_server): except:0@ host:5432 @ wt001112-local

DEBUG(PGRreplicate_packet_send_each_server): send replicate to:wt001112-local

DEBUG(PGRsend_replicate_packet_to_server): host(wt001112-local) : port(5432)
DEBUG(getDBServerTbl): search host is (wt001112-local) port[5432]
DEBUG(getDBServerTbl): not found
DEBUG(setDBServerTbl): setDBserverTbl host:wt001112-local port:5432 dbName:template1
DEBUG(getDBServerTbl): search host is (wt001112-local) port[5432]
DEBUG(getDBServerTbl): not found
DEBUG(pgr_createConn): PQsetdbLogin host[wt001112-local] port[5432] db[template1] user[postgres]
DEBUG(pgr_createConn): PQsetdbLogin ok!!
DEBUG(insertDBServerTbl): send_replicate_packet_to_server query=SELECT PGR_SYSTEM_COMMAND_FUNCTION(1,'wt001117',8777,7778)
DEBUG(insertDBServerTbl): db:template1 port:5432 user:postgres host:wt001112-local query:SELECT PGR_SYSTEM_COMMAND_FUNCTION(1,'wt001117',8777,7778)
ERROR(insertDBServerTbl): PQexec error
DEBUG(insertDBServerTbl): sem_lock[2]
DEBUG(PGRsem_lock): sem_unlock[1]
DEBUG(getDBServerTbl): search host is (wt001112-local) port[5432]
DEBUG(getDBServerTbl): search host(700110ac):port(5432):db(template1)
DEBUG(getDBServerTbl): found
DEBUG(PGRis_same_host): not same host:
DEBUG(is_need_response): same_host[0] mode[1] current[1]
DEBUG(PGRreplicate_packet_send_each_server): except:0@ host:5432 @ wt001113-local

DEBUG(PGRreplicate_packet_send_each_server): send replicate to:wt001113-local

DEBUG(PGRsend_replicate_packet_to_server): host(wt001113-local) : port(5432)
DEBUG(getDBServerTbl): search host is (wt001113-local) port[5432]
DEBUG(getDBServerTbl): not found
DEBUG(setDBServerTbl): setDBserverTbl host:wt001113-local port:5432 dbName:template1
DEBUG(getDBServerTbl): search host is (wt001113-local) port[5432]
DEBUG(getDBServerTbl): not found
DEBUG(pgr_createConn): PQsetdbLogin host[wt001113-local] port[5432] db[template1] user[postgres]
DEBUG(pgr_createConn): PQsetdbLogin ok!!
DEBUG(insertDBServerTbl): send_replicate_packet_to_server query=SELECT PGR_SYSTEM_COMMAND_FUNCTION(1,'wt001117',8777,7778)
DEBUG(insertDBServerTbl): db:template1 port:5432 user:postgres host:wt001113-local query:SELECT PGR_SYSTEM_COMMAND_FUNCTION(1,'wt001117',8777,7778)
ERROR(insertDBServerTbl): PQexec error
DEBUG(insertDBServerTbl): sem_lock[3]
DEBUG(PGRsem_lock): sem_unlock[2]
DEBUG(getDBServerTbl): search host is (wt001113-local) port[5432]
DEBUG(getDBServerTbl): search host(710110ac):port(5432):db(template1)
DEBUG(getDBServerTbl): found
DEBUG(PGRis_same_host): not same host:
DEBUG(is_need_response): same_host[0] mode[1] current[2]
DEBUG(PGRreplicate_packet_send_each_server): except:0@ host:5432 @ wt001114-local

DEBUG(PGRreplicate_packet_send_each_server): send replicate to:wt001114-local

DEBUG(PGRsend_replicate_packet_to_server): host(wt001114-local) : port(5432)
DEBUG(getDBServerTbl): search host is (wt001114-local) port[5432]
DEBUG(getDBServerTbl): not found
DEBUG(setDBServerTbl): setDBserverTbl host:wt001114-local port:5432 dbName:template1
DEBUG(getDBServerTbl): search host is (wt001114-local) port[5432]
DEBUG(getDBServerTbl): not found
DEBUG(pgr_createConn): PQsetdbLogin host[wt001114-local] port[5432] db[template1] user[postgres]
DEBUG(pgr_createConn): PQsetdbLogin ok!!
DEBUG(insertDBServerTbl): send_replicate_packet_to_server query=SELECT PGR_SYSTEM_COMMAND_FUNCTION(1,'wt001117',8777,7778)
DEBUG(insertDBServerTbl): db:template1 port:5432 user:postgres host:wt001114-local query:SELECT PGR_SYSTEM_COMMAND_FUNCTION(1,'wt001117',8777,7778)
ERROR(insertDBServerTbl): PQexec error
DEBUG(insertDBServerTbl): sem_lock[4]
DEBUG(PGRsem_lock): sem_unlock[3]
DEBUG(getDBServerTbl): search host is (wt001114-local) port[5432]
DEBUG(getDBServerTbl): search host(720110ac):port(5432):db(template1)
DEBUG(getDBServerTbl): found
DEBUG(getDBServerTbl): sem_unlock[4]
DEBUG(PGRsem_unlock): PGRreplicate_packet_send end
DEBUG(PGRsem_unlock): wait replicate


以上、よろしく御願いします。

-- 
黄川田光国 / KIKAWADA Mitsukuni <mitsukuni @ unixmagic.net>





pgcluster メーリングリストの案内