두대의 서버에 각각 설치하고 replicate 테스트중인데요
한대의 서버를 랜선을 제거 후 한곳 서버에 5432포트로 접속하여 데이터를 수정하면 특정 테이블만 가끔 수정이 되지 않습니다
제가 설정을 잘못한건지...
제 pgpool.conf 설정입니다. 양쪽 모두 똑같이 설정해줬는데 이게 맞는건지요?
지금 설정은 양쪽 모두 설정이 같게 해놨습니다.
"pgpool.conf" 143 행, 4556 문자
1 #
2 # pgpool configuration file sample
3 # $Header: /cvsroot/pgpool/pgpool/pgpool.conf.sample,v 1.9 2007/07/19 05:29:57 y-asaba Exp $
4
5 # Host name or IP address to listen on: '*' for all, '' for no TCP/IP
6 # connections
7 listen_addresses = '*'
8
9 # Port number for pgpool
10 port = 9999
11
12 # Unix domain socket path. (The Debian package defaults to
13 # /var/run/postgresql.)
14 socket_dir = '/data/pgpool/tmp'
15
16 # Host name where PostgreSQL server is running on. '' means localhost
17 # using Unix domain socket.
18 backend_host_name = 'svr1'
19
20 # port number PostgreSQL server is running on
21 backend_port = 5432
22
23 # Unix domain socket path for the backend. (The Debian package defaults
24 # to /var/run/postgresql.)
25 backend_socket_dir = '/data/pgpool/tmp'
26
27 # Host name where secondary PostgreSQL server is running on. '' means
28 # localhost using Unix domain socket.
29 secondary_backend_host_name = 'svr2'
30
31 # Port number secondary PostgreSQL server is running on. 0 means no
32 # secondary PostgreSQL.
33 secondary_backend_port = 5432
34
35 # Number of pre-forked child processes
36 num_init_children = 32
37
38 # Number of connection pools allowed for a child process
39 max_pool = 4
40
41 # If idle for this many seconds, child exits. 0 means no timeout.
42 child_life_time = 300
43
44 # If idle for this many seconds, connection to PostgreSQL closes.
45 # 0 means no timeout.
46 connection_life_time = 0
47
48 # If child_max_connections connections were received, child exits.
49 # 0 means no exit.
50 child_max_connections = 0
51
52 # Logging directory
53 logdir = '/tmp'
54
55 # Replication mode
56 replication_mode = true
57
58 # Set this to true if you want to avoid deadlock situations when
59 # replication is enabled. There will, however, be a noticable performance
60 # degration. A workaround is to set this to false and insert a /*STRICT*/
61 # comment at the beginning of the SQL command.
62 replication_strict = true
63
64 # When replication_strict is set to false, there will be a chance for
65 # deadlocks. Set this to nonzero (in milliseconds) to detect this
66 # situation and resolve the deadlock by aborting current session.
67 replication_timeout = 5000
68
69 # Load balancing mode, i.e., all SELECTs except in a transaction block
70 # are load balanced. This is ignored if replication_mode is false.
71 load_balance_mode = false
72
73 # Load balance weight for master and secondary. The actual weight is
74 # calculated by weight_master divided by weight_secondary. For
75 # example both
76 #
77 # weight_master = 10 and weight_secondary = 5
78 # weight_master = 4 and weight_secondary = 2
79 #
80 # are regarded as the master having double the weight compared to the
81 # secondary. Master and secondary have the same weight in the default.
82 weight_master = 0.5
83 weight_secondary = 0.5
84
85 # If there is a data mismatch between master and secondary, start
86 # degeneration to stop replication mode.
87 replication_stop_on_mismatch = true
88
89 # If true, replicate SELECT statement when load balancing is disabled.
90 # If false, it is only sended to the master node.
91 replicate_select = false
92
93 # Semicolon separated list of queries to be issued at the end of a session
94 reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'
95
96 # If true print time stamp on each log line.
97 print_timestamp = true
98
99 # If true, operate in master/slave mode.
100 master_slave_mode = false
101
102 # If true, cache connection pool.
103 connection_cache = true
104
105 # Health check timeout. 0 means no timeout.
106 health_check_timeout = 20
107
108 # Health check period. 0 means no health check.
109 health_check_period = 0
110
111 # Health check user
112 health_check_user = 'nobody'
113
114 # If true, automatically lock table with INSERT statements to keep SERIAL
115 # data consistency. An /*INSERT LOCK*/ comment has the same effect. A
116 # /NO INSERT LOCK*/ comment disables the effect.
117 insert_lock = false
118
119 # If true, ignore leading white spaces of each query while pgpool judges
120 # whether the query is a SELECT so that it can be load balanced. This
121 # is useful for certain APIs such as DBI/DBD which is known to adding an
122 # extra leading white space.
123 ignore_leading_white_space = false
124
125 # - What to Log -
126
127 # If true, print all statements to the log. Like the log_statement option
128 # to PostgreSQL, this allows for observing queries without engaging in full
129 # debugging.
130 log_statement = false
131
132 # If true, incoming connections will be printed to the log.
133 log_connections = false
134
135 # If true, hostname will be shown in ps status. Also shown in
136 # connection log if log_connections = true.
137 # Be warned that this feature will add overhead to look up hostname.
138 log_hostname = false
139
140 # - HBA -
141
142 # If true, use pool_hba.conf for client authentication.
143 enable_pool_hba = true
아니면 첫번째 서버의 backend_host_name = 'svr1' secondary_backend_host_name = 'svr2'
두번째 서버의 설정은 backend_host_name = 'svr2' secondary_backend_host_name = 'svr1'
이렇게 해주는게 맞는지요?
|