Dear users,<br><br>I have 3 backend, and one balancer, this is config of my balancer:<br><br>listen_addresses = &#39;*&#39;<br>port = 5433<br>socket_dir = &#39;/tmp&#39;<br>pcp_port = 9898<br>pcp_socket_dir = &#39;/tmp&#39;<br>
backend_hostname0 = &#39;10.2.141.54&#39;<br>backend_port0 = 5432<br>backend_weight0 = 0.499<br>backend_data_directory0 = &#39;/var/lib/postgresql/9.1/main&#39;<br>backend_hostname1 = &#39;10.2.141.55&#39;<br>backend_port1 = 5432<br>
backend_weight1 = 0.499<br>backend_data_directory1 = &#39;/var/lib/postgresql/9.1/main&#39;<br>backend_hostname2 = &#39;10.2.141.53&#39;<br>backend_port2 = 5432<br>backend_weight2 = 0.002<br>backend_data_directory2 = &#39;/var/lib/postgresql/9.1/main&#39;<br>
enable_pool_hba = off<br>authentication_timeout = 60<br>ssl = off<br>num_init_children = 120<br>max_pool = 2<br>child_life_time = 64800<br>child_max_connections = 1000<br>connection_life_time = 300<br>client_idle_limit = 64800<br>
log_destination = &#39;stderr&#39;<br>print_timestamp = on<br>log_connections = off<br>log_hostname = on<br>log_statement = off<br>log_per_node_statement = off<br>log_standby_delay = &#39;if_over_threshold&#39;<br>syslog_facility = &#39;LOCAL0&#39;<br>
syslog_ident = &#39;pgpool&#39;<br>debug_level = 0<br>pid_file_name = &#39;/var/run/pgpool/pgpool.pid&#39;<br>logdir = &#39;/tmp&#39;<br>connection_cache = on<br>reset_query_list = &#39;ABORT; DISCARD ALL&#39;<br>replication_mode = off<br>
replicate_select = off<br>insert_lock = off<br>lobj_lock_table = &#39;&#39;<br>replication_stop_on_mismatch = off<br>failover_if_affected_tuples_mismatch = off<br>load_balance_mode = on<br>ignore_leading_white_space = on<br>
white_function_list = &#39;&#39;<br>black_function_list = &#39;nextval,setval&#39;<br>master_slave_mode = on<br>master_slave_sub_mode = &#39;stream&#39;<br>sr_check_period = 10<br>sr_check_user = &#39;sr_check&#39;<br>sr_check_password = &#39;sr_check1&#39;<br>
delay_threshold = 100<br>follow_master_command = &#39;/etc/pgpool.d/follow_master_command.sh %d %h %p %D %m %H %M %P&#39;<br>parallel_mode = off<br>enable_query_cache = off<br>pgpool2_hostname = &#39;&#39;<br>system_db_hostnameš = &#39;localhost&#39;<br>
system_db_port = 5432<br>system_db_dbname = &#39;pgpool&#39;<br>system_db_schema = &#39;pgpool_catalog&#39;<br>system_db_user = &#39;pgpool&#39;<br>system_db_password = &#39;&#39;<br>health_check_period = 5<br>health_check_timeout = 20<br>
health_check_user = &#39;health_check&#39;<br>health_check_password = &#39;health_check1&#39;<br>failover_command = &#39;/etc/pgpool.d/failover.sh %d %h %p %D %m %H %M %P&#39;<br>failback_command = &#39;/etc/pgpool.d/failback_command.sh %d %h %p %D %m %H %M %P&#39;<br>
fail_over_on_backend_error = on<br>recovery_user = &#39;postgres&#39;<br>recovery_password = &#39;postgres&#39;<br>recovery_1st_stage_command = &#39;copy_base_backup&#39;<br>recovery_2nd_stage_command = &#39;&#39;<br>recovery_timeout = 90<br>
client_idle_limit_in_recovery = 0<br>relcache_expire = 5<br><br>Client use PgAdmin to connect to pool and sometimes DML go to the slave server, and i see this error in pgpool.log:<br><br>2012-03-28 14:48:41 ERROR: pid 18767: read_kind_from_backend: 0 th kind C does not match with master or majority connection kind E<br>
2012-03-28 14:48:41 ERROR: pid 18767: kind mismatch among backends. Possible last query was: &quot;set role muvi;<br>/* Newsletter subject and body templates with boundaries imposed by body markup */<br>CREATE TABLE NewsletterTemplate (<br>
š newsletter_template_uid uuid DEFAULT uuid_generate_v1() NOT NULL, /* Template id */<br><br>š subject_template_path varchar (255) NOT NULL,šššššššššššššššššššš /* Unique name of message subject velocity template */<br>š body_template_path varchar (255) NOT NULL,ššššššššššššššššššššššš /* Unique name of message body velocity template */<br>
<br>š free_content text,ššššššššššššššššššššššššššššššššššššššššššššššš /* Free text content */<br><br>š /* Limits of how many digest items of each type can fit into template body */<br>š recent_friends_limit integer DEFAULT 0 NOT NULL,ššššššššššššššššš /* Recent friends limit */<br>
š recommendations_limit integer DEFAULT 0 NOT NULLššššššššššššššššš /* Recommendations limit */<br>);<br><br>COMMENT ON TABLE NewsletterTemplate<br>ššš IS &#39;Newsletter subject and body templates with boundaries imposed by body markup&#39;<br>
;<br>COMMENT ON COLUMN NewsletterTemplate.newsletter_template_uid<br>ššš IS &quot; kind details are: 0[C] 1[E: cannot execute CREATE TABLE in a read-only transaction] 2[E: cannot execute CREATE TABLE in a read-only transaction]<br>
2012-03-28 14:48:41 LOG:šš pid 18767: do_child: exits with status 1 due to error<br><br clear="all"><br>Replication is <span class="Bold"> organize by native Postgresql streaming replication. My version Postgresql - 9.1.3 and my version pgpool-II version 3.1.2<br>
<br></span>-- <br>σ ΥΧΑΦΕΞΙΕΝ σΕΜΡΧΛΑ εΧΗΕΞΙΚ<br>